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

FeatureStructure.equals returns false for same FS obtained through different views

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1
    • Core Java Framework
    • None

    Description

      This is because the implementation of FeatureStructure.equals checks that the FS are both pointing to the same CAS object. But the CAS reference of an FS is currently being set to whichever view that FS was created off of. So if you obtain a reference to an FS through two different views, equals() will always return false because the CAS references don't match. This broke the CasCopier utility which relies on equals() to work correctly.

      I will attach a simple patch for the SofaTest testcase that demonstrates the problem.

      Attachments

        1. fsEqualsTest.patch
          0.8 kB
          Adam P. Lally

        Activity

          People

            twgoetz Thilo Goetz
            alally Adam P. Lally
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: