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

check for addFS with wrong Sofa misses many paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.6.0SDK
    • 2.7.0SDK
    • Core Java Framework
    • 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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: