Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4170614

Two package private classes violate Object.hashCode contract

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      kestrel
    • CPU:
      generic
    • OS:
      generic, solaris_2.6

      Description

          The PatternEntry and IntHashtable classes override Object.equals but
      not Object.hashCode. This violates the restriction that:

      a.equals(b) ==> a.hashCode()==b.hashCode()

      As these classes are package-private, there is no immediate danger to external
      users, but until the situation is corrected, it's waiting to bite us.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rgillamsunw Richard Gillam (Inactive)
              Reporter:
              jjb Josh Bloch
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: