Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Moderate
Description
While it is obviously trivial to create different HashMaps with identical hashCodes, I'd still expect the following test code to pass:
HashMap map1 = new HashMap(10);
HashMap map2 = new HashMap(10);
map1.put("key", "1");
map2.put("key", "2");
assertFalse(map1.hashCode() == map2.hashCode());
That is, I'd expect the 'value' associated with "key" to have some impact on the hashCode. It passes on the reference implementations I tested.
Attachments
Attachments
Issue Links
- is related to
-
HARMONY-206 HashMap's behavior is non-compliant with RI when key is reused
- Closed