[jira] [Commented] (LANG-1368) HashCodeBuilder.append incorrect behavior with chains of nulls

2018-02-19 Thread Iurii (JIRA)

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

Iurii commented on LANG-1368:
-

Unfortunately I don't have any Mac machine available to test that. Please let 
me know if you find out some more info on this issue.

And if someone is able to test that on Mac with eclipse, I guess that would be 
great also.

> HashCodeBuilder.append incorrect behavior with chains of nulls
> --
>
> Key: LANG-1368
> URL: https://issues.apache.org/jira/browse/LANG-1368
> Project: Commons Lang
>  Issue Type: Bug
>Reporter: Ryan Wisnesky
>Priority: Minor
>
> I have a 7-way choice/sum/variant class, so that 6 of its 7 fields are null 
> in each object of that class.  When using HashCodeBuilder's reflective 
> hashCode, a 10k line java project works correctly.  When using 
> HashCodeBuilder.append instead, sequential calls to append with a null 
> argument cause the returned hashCode to be inconsistent with EqualsBuilder.  
> Correct behavior can be restored by appending a dummy non-null field 
> initially:
>   new HashCodeBuilder()
>   .append(true) //bad return value 
> without this dummy call
>   .append(chc1)
> ...
>   .append(chc7)
>   .toHashCode();
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LANG-1368) HashCodeBuilder.append incorrect behavior with chains of nulls

2018-02-18 Thread Ryan Wisnesky (JIRA)

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

Ryan Wisnesky commented on LANG-1368:
-

I’m sorry, but this has been lost to time.  I can add that it was using the 
eclipse compiler for java 8 on a Mac.  



> HashCodeBuilder.append incorrect behavior with chains of nulls
> --
>
> Key: LANG-1368
> URL: https://issues.apache.org/jira/browse/LANG-1368
> Project: Commons Lang
>  Issue Type: Bug
>Reporter: Ryan Wisnesky
>Priority: Minor
>
> I have a 7-way choice/sum/variant class, so that 6 of its 7 fields are null 
> in each object of that class.  When using HashCodeBuilder's reflective 
> hashCode, a 10k line java project works correctly.  When using 
> HashCodeBuilder.append instead, sequential calls to append with a null 
> argument cause the returned hashCode to be inconsistent with EqualsBuilder.  
> Correct behavior can be restored by appending a dummy non-null field 
> initially:
>   new HashCodeBuilder()
>   .append(true) //bad return value 
> without this dummy call
>   .append(chc1)
> ...
>   .append(chc7)
>   .toHashCode();
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (LANG-1368) HashCodeBuilder.append incorrect behavior with chains of nulls

2018-02-18 Thread Iurii (JIRA)

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

Iurii commented on LANG-1368:
-

Can you add some test with exact cases that reproduce the issue? I tried 
running sequences of append with null arguments and I always got a consistent 
with EqualsBuilder result. 

> HashCodeBuilder.append incorrect behavior with chains of nulls
> --
>
> Key: LANG-1368
> URL: https://issues.apache.org/jira/browse/LANG-1368
> Project: Commons Lang
>  Issue Type: Bug
>Reporter: Ryan Wisnesky
>Priority: Minor
>
> I have a 7-way choice/sum/variant class, so that 6 of its 7 fields are null 
> in each object of that class.  When using HashCodeBuilder's reflective 
> hashCode, a 10k line java project works correctly.  When using 
> HashCodeBuilder.append instead, sequential calls to append with a null 
> argument cause the returned hashCode to be inconsistent with EqualsBuilder.  
> Correct behavior can be restored by appending a dummy non-null field 
> initially:
>   new HashCodeBuilder()
>   .append(true) //bad return value 
> without this dummy call
>   .append(chc1)
> ...
>   .append(chc7)
>   .toHashCode();
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)