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

java.text.[IntHashtable and PatternEntry] violate Object.hashCode contract

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_2.6

      Description

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

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

      If our customers use objects of any of these classes as keys in Hashtables or
      HashMaps, or elements in HashSets, the basic invariants of the collections will
      be corrupted, leading to erratic behavior.

      We have fixed this problem for awt (see bug 4157612)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nlindenbsunw Norbert Lindenberg (Inactive)
              Reporter:
              tdv Dmitri Trembovetski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: