Affects Version/s: 1.2 Final
Fix Version/s: 1.3
Operating System: All
The method call JXPathContext::iteratePointers() returns the correct number of
pointers. However, the pointers do not always return correct path on asPath()
method call on them. A pointer returns a path that corresponds to the last
Node in the sibling Nodes of the node that the pointer points to.
Here is an example:
private List list;
//getter and setter
Here is a code snippet for creating an object graph that starts from
instance of A.
A a1 = new A();
List list1 = new LinkedList();
A a11 = new A();
A a12 = new A();
List list12 = new LinkedList();
A a121 = new A();
A a13 = new A();
And the list attribute can have instances of A as elements in it.
The JXPathContext correspong to a1 returns pointers when it's iteratePointers
() method is called. And the pointers correspond to the following nodes.
This is absolutely as expected. However, asPath() method on each of these
Pointers do not always return the correct path.
Currently, the asPath() method calls on the corresponding Pointers return this
This needs to be fixed.
|Field||Original Value||New Value|
|Affects Version/s||1.2 Final [ 12311699 ]|
|Fix Version/s||1.3 [ 12312253 ]|
|Summary||[jxpath] asPath() returns a path to the last sibling||asPath() returns a path to the last sibling|