changeset 5059:cbd726c8b322

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
author mduigou
date Thu, 07 Jun 2012 01:01:09 -0700
parents f7cc2b4c10d8
children f1152e1c7ae7
files src/share/classes/java/util/HashMap.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/HashMap.java	Thu Jun 07 17:38:57 2012 +0100
+++ b/src/share/classes/java/util/HashMap.java	Thu Jun 07 01:01:09 2012 -0700
@@ -679,7 +679,7 @@
 
         Map.Entry<K,V> entry = (Map.Entry<K,V>) 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);
         Entry<K,V> prev = table[i];
         Entry<K,V> e = prev;