Frank Wildenhain created LANG-1203:
--------------------------------------

             Summary: Separated annotations HashCodeExclude and EqualsExclude 
break the general contract for the hashCode method in java.lang.Object
                 Key: LANG-1203
                 URL: https://issues.apache.org/jira/browse/LANG-1203
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.builder.*
            Reporter: Frank Wildenhain


Since version 3.5-SNAPSHOT the annotations HashCodeExclude and EqualsExclude 
exist in component 
[lang.builder.*|https://git-wip-us.apache.org/repos/asf?p=commons-lang.git;a=tree;f=src/main/java/org/apache/commons/lang3/builder;hb=HEAD].

A separated handling of both annotations breaks the general contract for the 
hashCode method in java.lang.Object ("If two objects are equal according to the 
equals(Object) method, then calling the hashCode method on each of the two 
objects must produce the same integer result.").

Rather there should exist only one exclude annotation dedicated to both 
methods, like 'EqualsAndHashCodeExclude'.



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

Reply via email to