Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.0.0 Final
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Two objects can be equal but have different hashcodes - this means they cannot be used as a key in a hashmap!
public boolean equals(Object object)
{ if (super.equals(object) == true) return true; if (!(object instanceof Field)) return false; return tag == ((Field) object).getField() && getObject().equals(((Field) object).getObject()); }public int hashCode()
{ return object.hashCode(); }