Labels: bug
Body:
Summary
DD defines equals(DD y) (line 988) with parameter type DD instead of Object. This is
a method overload, not an override of Object.equals(Object). Standard Java APIs
(HashMap, HashSet, List.contains(), etc.) call equals(Object), which falls through
to Object.equals() (identity comparison).
Additionally, DD implements Comparable with a value-based compareTo() and Cloneable
with clone(), but since Object.equals() is not properly overridden, both the
compareTo-equals consistency and clone-equals contracts are violated.
How this was found
Detected by automated JDK conformance oracles (checkCompareToEqualsConsistency,
checkCloneEqualsConsistency).