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

Character.Subset.hashCode() missing: violates contract

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • core-libs
    • None
    • 1.2fcs
    • generic
    • generic
    • Not verified

      The above-named class overrides Object.equals but not Object.hashCode. This violates the restriction that:

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

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

            mr Mark Reinhold
            dbrownelsunw David Brownell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: