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)
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)
- duplicates
-
JDK-4170614 Two package private classes violate Object.hashCode contract
- Resolved
- relates to
-
JDK-4157612 Many classes violate Object.hashCode contract
- Resolved