Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1203

Separated annotations HashCodeExclude and EqualsExclude break the general contract for the hashCode method in java.lang.Object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5
    • None
    • lang.builder.*
    • None

    Description

      Since version 3.5-SNAPSHOT the annotations HashCodeExclude and EqualsExclude exist in component lang.builder.*.

      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'.

      Attachments

        Activity

          People

            Unassigned Unassigned
            wildhai Frank Forster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: