Description
The CasAnnotationViewer has a long-standing issue - it doesn't properly handle the displaying features which are built-in arrays (except FSArray), if the CAS being viewed is a JCas style Cas - a class cast exception happens. This problem predates the changes introduced in UIMA-3374, but is present there too. Prior to UIMA-3374, the CasAnnotationViewer did not activate the JCas, and the DocumentAnalyzer (a main caller of this viewer) always passed in a non-JCas CAS, so things worked.
The changes in UIMA-3374 activated the JCas (it did a cas.getJCas()), and this exposed these previously present errors which generate class cast exceptions. These errors are caused by code that presumed a non-JCas style of CAS, and did casts that depended on this. One instance of this is the line
StringArrayFSImpl arrayFS = (StringArrayFSImpl) aFS.getFeatureValue(feature);
which generates a cast exception if the JCas is being used.
Scan the code to find any other instances of an assumption being made of the kind of cover class.
Attachments
Issue Links
- is related to
-
UIMA-3374 A new mode for annotation viewer based on feature values
- Resolved