camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yann MOLLIER (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-7611) org.apache.camel.util.KeyValueHolder equals bug
Date Fri, 18 Jul 2014 11:55:04 GMT
Yann MOLLIER created CAMEL-7611:
-----------------------------------

             Summary: org.apache.camel.util.KeyValueHolder equals bug
                 Key: CAMEL-7611
                 URL: https://issues.apache.org/jira/browse/CAMEL-7611
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.13.2, 2.12.4, 2.10.2
         Environment: AIX, Weblogic
            Reporter: Yann MOLLIER


According to java.lang.Object javadoc (http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html),
"equal objects must have equal hash codes". 

Current implementation of the "equals" and "hashCode" method of the org.apache.camel.util.KeyValueHolder
does not seem to follow that rule: hashCode is calculated from the key and value attributes
while the equals compares only the key attribute. 

Could generate unexpected behaviour in certain circumstances.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message