commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (JXPATH-172) JXPathContext#getPointer claims that null will be returned if the XPath expr does not point to a valid node
Date Mon, 24 Nov 2014 10:58:12 GMT

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

Michael Osipov edited comment on JXPATH-172 at 11/24/14 10:57 AM:
------------------------------------------------------------------

bq. pointer will have a null value

Even that is not true. It either throws the mentioned exception or returns some {{NullPointer}}
implementation. I am applying pointer arithmetic on beans with collections. So, I have a hybrid
approach.

An elaborated description would be way better. You have already layed out the possible cases.


was (Author: michael-o):
{quote}
pointer will have a null value
{quote}

Even that is not true. It either throws the mentioned exception or returns some {{NullPointer}}
implementation. I am applying pointer arithmetic on beans with collections. So, I have a hybrid
approach.

An elaborated description would be way better. You have already layed out the possible cases.

> JXPathContext#getPointer claims that null will be returned if the XPath expr does not
point to a valid node
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: JXPATH-172
>                 URL: https://issues.apache.org/jira/browse/JXPATH-172
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>
> {quote}
> Traverses the xpath and returns a Pointer. A Pointer provides easy access to a property.
If the xpath matches no properties in the graph, the pointer will be null.
> {quote}
> This is not true because not {{null}} is returned but {{NullPointer}}. This makes a tremendous
difference.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message