7174736: JCK test api/java_util/HashMap/index_EntrySet failing
authormduigou
Thu, 07 Jun 2012 01:01:09 -0700
changeset 12883 0553a7aa3404
parent 12882 35d381df9422
child 12884 8ff7cb7b7dd0
child 12885 30a5ef357cf1
7174736: JCK test api/java_util/HashMap/index_EntrySet failing Summary: Corrects a problem with HashMap.removeEntry() that caused a JCK test to fail Reviewed-by: mduigou Contributed-by: alan.bateman@oracle.com
jdk/src/share/classes/java/util/HashMap.java
--- a/jdk/src/share/classes/java/util/HashMap.java	Thu Jun 07 18:42:47 2012 +0100
+++ b/jdk/src/share/classes/java/util/HashMap.java	Thu Jun 07 01:01:09 2012 -0700
@@ -611,7 +611,7 @@
 
         Map.Entry<?,?> entry = (Map.Entry<?,?>) o;
         Object key = entry.getKey();
-        int hash = (key == null) ? 0 : hash(key.hashCode());
+        int hash = (key == null) ? 0 : hash(key);
         int i = indexFor(hash, table.length);
         @SuppressWarnings("unchecked")
             Entry<K,V> prev = (Entry<K,V>)table[i];