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

check for addFS with wrong Sofa misses many paths

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0SDK
    • Fix Version/s: 2.7.0SDK
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      The docs say that subtypes of AnnotationBase can only be added to indices in the CAS View associated with the Sofa for that Feature Structure (see http://uima.apache.org/d/uimaj-2.6.0/tutorials_and_users_guides.html#ugr.tug.aas.annotations_associated_sofa )

      A check was put in to enforce this, in the casImpl code, when calling aCasView.addFsToIndexes. Unfortunately, this check misses checking the many other paths that are used to add a FS to an index. For instance, the path when using JCas: instance.addToIndexes(), and many others.

      Fix this by moving the test downwards to the place where all code paths flow together.

      Allow restoring the old behavior in case needed, via a JVM -D parameter: uima.disable_enhanced_check_wrong_add_to_index

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development