Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-4535

Flatten indexes need to be invalidated when switching to JCas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.0SDK
    • 2.8.1SDK
    • Core Java Framework
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              schor Marshall Schor
              schor Marshall Schor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: