Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 17882 invoked from network); 2 Feb 2008 20:56:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2008 20:56:32 -0000 Received: (qmail 88740 invoked by uid 500); 2 Feb 2008 20:56:23 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 88666 invoked by uid 500); 2 Feb 2008 20:56:22 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 88657 invoked by uid 99); 2 Feb 2008 20:56:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2008 12:56:22 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Sat, 02 Feb 2008 20:56:16 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6BAFA714049 for ; Sat, 2 Feb 2008 12:56:08 -0800 (PST) Message-ID: <33486062.1201985768438.JavaMail.jira@brutus> Date: Sat, 2 Feb 2008 12:56:08 -0800 (PST) From: "Matt Benson (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (JXPATH-113) NullPointerException in ChildContext In-Reply-To: <5037640.1198431522992.JavaMail.jira@brutus> 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-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Benson resolved JXPATH-113. -------------------------------- Resolution: Fixed Fix Version/s: 1.3 This one was obvious enough that just a claim of an NPE was good enough. I've committed essentially the fix you've suggested, rev 617893. Thanks! > NullPointerException in ChildContext > ------------------------------------ > > Key: JXPATH-113 > URL: https://issues.apache.org/jira/browse/JXPATH-113 > Project: Commons JXPath > Issue Type: Bug > Reporter: Michele Vivoda > Priority: Minor > Fix For: 1.3 > > > In ChildContext I get a NullPointerException, the error appears in method prepare() > iterator = (startFromParentLocation ? parent.getParent() : parent).childIterator(nodeTest, > reverse, startFromParentLocation ? parent : null); > > should be changed in my opinion to > final NodePointer actualParent = startFromParentLocation ? parent.getParent() : parent; > iterator = actualParent==null ? null : actualParent.childIterator(nodeTest, > reverse, startFromParentLocation ? parent : null); > The tests triggering the error are testIssue172_CountFollowingSiblingNode and testIssue172_CountPrecedingSiblingNode -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.