[infinispan-issues] [JBoss JIRA] (ISPN-2693) ByteArrayKey should print out its hashCode
Radim Vansa (JIRA)
jira-events at lists.jboss.org
Tue Jan 8 04:28:08 EST 2013
Radim Vansa created ISPN-2693:
---------------------------------
Summary: ByteArrayKey should print out its hashCode
Key: ISPN-2693
URL: https://issues.jboss.org/browse/ISPN-2693
Project: Infinispan
Issue Type: Bug
Components: Marshalling
Reporter: Radim Vansa
Assignee: Galder Zamarreño
Priority: Minor
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