Cannot compare pointers that do not belong to the same tree
-----------------------------------------------------------
Key: JXPATH-89
URL: https://issues.apache.org/jira/browse/JXPATH-89
Project: Commons JXPath
Issue Type: Bug
Affects Versions: 1.2 Final, Nightly Builds
Environment: codebase: 1.2 or latest version from SVN, JDK 1.4
Reporter: Sergey Vladimirov
Attachments: VariablePointerTestCase.java
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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]