You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/02/03 00:14:43 UTC
DO NOT REPLY [Bug 33377] New: -
A bug in BeanPointer::asPath()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33377>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33377
Summary: A bug in BeanPointer::asPath()
Product: Commons
Version: 1.2 Final
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: JXPath
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: krishna.patil@gmail.com
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:
Class A{
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();
list1.add(a11);
A a12 = new A();
List list12 = new LinkedList();
A a121 = new A();
list12.add(a121);
a12.setList(list12);
list1.add(a12);
A a13 = new A();
list1.add(a11);
a1.setList(list1);
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.
A[1]
A[2]
A[2]/A[1]
A[3]
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
output respectively.
A[3]
A[3]
A[2]/A[1]
A[3]
This needs to be fixed.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org