CDV ❯ ConcurrentHashMapKeySetWrapper does not implement equals()
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Duplicate
-
DSO:L1
-
-
drb
-
Reporter: bluearth
-
April 19, 2011
-
0
-
Watchers: 2
-
July 27, 2012
-
April 20, 2011
Description
ConcurrentHashMapKeySetWrapper does not implement equals(), violating the contract of java.util.Set.
As a result, following codes will fail when instrumented with a dso bootjar.
Map map1 = … Map map2 = New ConcurrentHashMap(map1);
assertTrue(map2.equals(map1)); <– OK
Set keySet1 = map1.ketSet(); Set keySet2 = map2.ketSet();
assertTrue(keySet2.equals(keySet1)); <– FAIL!
Oops! It looks like this is a duplicate of CDV-1558.