CWE-581: Object Model Violation: Just One of Equals and Hashcode Defined
VariantDraft
The product does not maintain equal hashcodes for equal objects.
View on MITREBack to CWE Lookup
Extended Description
Java objects are expected to obey a number of invariants related to equality. One of these invariants is that equal objects must have equal hashcodes. In other words, if a.equals(b) == true then a.hashCode() == b.hashCode().
Technical Details
- Structure
- Simple
Applicable To
Java