-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.0
-
None
-
generic
-
generic
The AffineTransform, Dimension, Insets, ColorModel, ComponentColorModel, PackedColorModel, AlphaComposite and BasicStroke 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.
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.
- duplicates
-
JDK-4157612 Many classes violate Object.hashCode contract
- Resolved