Commons JXPath
  1. Commons JXPath
  2. JXPATH-89

Cannot compare pointers that do not belong to the same tree

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Final, Nightly Builds
    • Fix Version/s: 1.3
    • Labels:
      None
    • Environment:

      codebase: 1.2 or latest version from SVN, JDK 1.4

      Description

      For XPath "$var | /MAIN/A" exception is thrown:

      org.apache.commons.jxpath.JXPathException: Cannot compare pointers that do not belong to the same tree: '$var' and ''
      at org.apache.commons.jxpath.ri.model.NodePointer.compareNodePointers(NodePointer.java:665)
      at org.apache.commons.jxpath.ri.model.NodePointer.compareNodePointers(NodePointer.java:649)
      at org.apache.commons.jxpath.ri.model.NodePointer.compareNodePointers(NodePointer.java:649)
      at org.apache.commons.jxpath.ri.model.NodePointer.compareTo(NodePointer.java:639)
      at java.util.Arrays.mergeSort(Arrays.java:1152)
      at java.util.Arrays.sort(Arrays.java:1079)
      at java.util.Collections.sort(Collections.java:113)
      at org.apache.commons.jxpath.ri.EvalContext.constructIterator(EvalContext.java:176)
      at org.apache.commons.jxpath.ri.EvalContext.hasNext(EvalContext.java:100)
      at org.apache.commons.jxpath.JXPathContext.selectNodes(JXPathContext.java:648)
      at org.apache.commons.jxpath.ri.model.VariablePointerTestCase.testUnionOfVariableAndNode(VariablePointerTestCase.java:76)

      1. VariablePointerTestCase.java
        3 kB
        Sergey Vladimirov
      2. VariablePointerTestCase.java
        4 kB
        Sergey Vladimirov
      3. hack-patch.txt
        3 kB
        Sergey Vladimirov

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sergey Vladimirov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development