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

Giacomo Guarguaglini commented on JXPATH-170:
---------------------------------------------

Yes it seems OK now.

I'll try to download the latest release to verify if the fix has been
included.

Regards

Giacomo



---
Questa e-mail è priva di virus e malware perché è attiva la protezione avast! 
Antivirus.
http://www.avast.com



> NullPointerException using 
> org.apache.commons.jxpath.ri.model.dynamic.DynamicPointer
> ------------------------------------------------------------------------------------
>
>                 Key: JXPATH-170
>                 URL: https://issues.apache.org/jira/browse/JXPATH-170
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.2 Final
>            Reporter: Giacomo Guarguaglini
>             Fix For: 1.4
>
>
> Trying to use alternative xpath (for example "homeAddress | streetNumber") we 
> get a NullPointerException in 
> org.apache.commons.jxpath.ri.model.dynamic.DynamicPointer.hashCode
> and
> org.apache.commons.jxpath.ri.model.dynamic.DynamicPointer.equals
> due to not checked null value for attribute name.
> Original code:
> public int hashCode() {
>         return System.identityHashCode(bean) + name.hashCode();
>     }
> fixed code
>  public int hashCode() {
>         return System.identityHashCode(bean) + ((name != null) ? 
> name.hashCode() : 0);
>     }
> In a similar way for equals method.



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

Reply via email to