[infinispan-issues] [JBoss JIRA] (ISPN-2693) ByteArrayKey should print out its hashCode

Galder Zamarreño (JIRA) jira-events at lists.jboss.org
Mon Jan 28 12:55:47 EST 2013


     [ https://issues.jboss.org/browse/ISPN-2693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on ISPN-2693 started by Galder Zamarreño.

> ByteArrayKey should print out its hashCode
> ------------------------------------------
>
>                 Key: ISPN-2693
>                 URL: https://issues.jboss.org/browse/ISPN-2693
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Marshalling
>    Affects Versions: 5.2.0.Beta6
>            Reporter: Radim Vansa
>            Assignee: Galder Zamarreño
>            Priority: Minor
>             Fix For: 5.2.0.Final
>
>
> When a ByteArrayKey is printed out, the format is {{ByteArrayKey{data=ByteArray{size=..., hashCode=..., array=...}}}}
> However, ByteArray computes hashCode using array.hashCode() instead of Arrays.hashCode(array) and, therefore, two equal ByteArrayKeys have different hashCode when printed out.
> Another way to fix that could be using Arrays.hashCode(array) in Util.printArray() (although I am not sure whether this could break anything).
> As the result is pretty unexpected, I consider this a bug rather than a feature request.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the infinispan-issues mailing list