Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 51557 invoked from network); 5 Jan 2007 05:18:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jan 2007 05:18:25 -0000 Received: (qmail 49875 invoked by uid 500); 5 Jan 2007 05:18:02 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 48084 invoked by uid 500); 5 Jan 2007 05:17:55 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 46431 invoked by uid 99); 5 Jan 2007 05:17:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 21:17:46 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 20:47:13 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 84198714310 for ; Thu, 4 Jan 2007 20:46:27 -0800 (PST) Message-ID: <21193598.1167972387516.JavaMail.jira@brutus> Date: Thu, 4 Jan 2007 20:46:27 -0800 (PST) From: "Niall Pemberton (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Updated: (JXPATH-5) [jxpath] asPath() returns a path to the last sibling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JXPATH-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niall Pemberton updated JXPATH-5: --------------------------------- Fix Version/s: 1.3 > [jxpath] asPath() returns a path to the last sibling > ---------------------------------------------------- > > Key: JXPATH-5 > URL: https://issues.apache.org/jira/browse/JXPATH-5 > Project: Commons JXPath > Issue Type: Bug > Affects Versions: 1.2 Final > Environment: Operating System: All > Platform: All > Reporter: Krishna Patil > Fix For: 1.3 > > > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org