Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1535

Some tests assume that an implementation of javax.jcr.Item overrides equals()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: jackrabbit-jcr-tests
    • Labels:
      None

      Description

      The following 3 tests (followed by the line number containing the bad assertion):

      org.apache.jackrabbit.test.api.ReferencesTest.testReferenceTarget:135
      org.apache.jackrabbit.test.api.ReferencesTest.testAlterReference:169
      org.apache.jackrabbit.test.api.version.VersionHistoryTest:152

      assume that an implementation of javax.jcr.Item overrides equals(), such that

      Assert.assertEquals(n1, n2) or
      java.util.Set.contains(n1)

      works for two "equal" nodes n1,n2 or for some node n1 that has been previously put into a set. However, there is no section in the specification that would mandate this. The tests above should therefore replace assertEquals() with one of the other mechanism that officially supported, such as javax.jcr.Node.isSame().

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dpfister Dominique Pfister
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: