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

AbstractQueryTest.hasDescriptor performing incorrect check

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: test
    • Labels:
      None

      Description

      The following method in AbstractQueryTest is incorrect. Accoring to the spec (section 6.1.1.1), if an option is not supported it should return "false". This method in the TCK instead assumes that "null" will be returned, and as a result does not throw an NotExecutableException.

      protected boolean hasDescriptor(String descriptor)

      { return superuser.getRepository().getDescriptor(descriptor) != null; }

      It should instead be:

      protected boolean hasDescriptor(String descriptor)

      { return superuser.getRepository().getDescriptor(descriptor).equals("true"); }

      This TCK bug causes the following (5) testcases to fail:

      XPathPosIndexTest.testDocOrderIndexedNotation()

      XPathDocOrderTest.testDocOrderFirstFunction()
      XPathDocOrderTest.testDocOrderLastFunction()
      XPathDocOrderTest.testDocOrderPositionFunction()
      XPathDocOrderTest.testDocOrderPositionIndex()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                stopponi Melissa Stopponi
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: