You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2016/10/22 13:08:58 UTC

[jira] [Updated] (LANG-1203) Separated annotations HashCodeExclude and EqualsExclude break the general contract for the hashCode method in java.lang.Object

     [ https://issues.apache.org/jira/browse/LANG-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pascal Schumacher updated LANG-1203:
------------------------------------
    Affects Version/s: 3.5

> 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.*
>    Affects Versions: 3.5
>            Reporter: Frank Forster
>
> 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)