-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6u24
-
x86
-
windows_7
A DESCRIPTION OF THE PROBLEM :
HashSet implementation relies on hashCode for objects kept in Set and not on the equals.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
if this set contains no element e2 such that (e==null ? e2==null : e.hashCode()==e2.hashCode).
ACTUAL -
if this set contains no element e2 such that (e==null ? e2==null : e.equals(e2)).
URL OF FAULTY DOCUMENTATION :
http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html#add(E)
HashSet implementation relies on hashCode for objects kept in Set and not on the equals.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
if this set contains no element e2 such that (e==null ? e2==null : e.hashCode()==e2.hashCode).
ACTUAL -
if this set contains no element e2 such that (e==null ? e2==null : e.equals(e2)).
URL OF FAULTY DOCUMENTATION :
http://download.oracle.com/javase/6/docs/api/java/util/HashSet.html#add(E)
- duplicates
-
JDK-6579200 (coll) HashSet.contains method violates Set.contains contract
-
- Closed
-