commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Vivoda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JXPATH-113) NullPointerException in ChildContext
Date Thu, 30 Jan 2014 20:44:09 GMT

    [ https://issues.apache.org/jira/browse/JXPATH-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887028#comment-13887028
] 

Michele Vivoda commented on JXPATH-113:
---------------------------------------

Done !


> 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 was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message