You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2015/07/24 21:36:04 UTC

[jira] [Created] (UIMA-4535) Flatten indexes need to be invalidated when switching to JCas

Marshall Schor created UIMA-4535:
------------------------------------

             Summary: Flatten indexes need to be invalidated when switching to JCas
                 Key: UIMA-4535
                 URL: https://issues.apache.org/jira/browse/UIMA-4535
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
    Affects Versions: 2.8.0SDK
            Reporter: Marshall Schor
            Assignee: Marshall Schor
             Fix For: 2.8.1SDK


uima 2.8.0 introduced automatically-generated "flattened-indexes", created after measurements of use indicate it would be beneficial to replace iteration over a type with (lots of) subtypes, with a flattened version of that index.  These flattened versions hold the Java cover class instantiation of the instances.  

If these are created before JCas is used, then the cover classes are the non-JCas ones, e.g. FeatureStructureImpl or AnnotationImpl.  After the JCas is used, the generators are switched to use the JCas ones.

A problem occurs in this case: JCas is not used, a flattened index is created, JCas is activated, and then an iteration is done over the flattened index.  This iteration will return the non-JCas versions of the cover classes, potentially causing class cast exceptions.

The fix, I think, is to invalidate any flattened indexes that might exist in all views, the first time JCas use is started. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)