7174736: JCK test api/java_util/HashMap/index_EntrySet failing

Corrects a problem with HashMap.removeEntry() that caused a JCK test to fail

Reviewed-by: mduigou
This commit is contained in:
Alan Bateman 2012-06-07 01:01:09 -07:00 committed by Mike Duigou
parent 519dc0c3f9
commit f3159c31b0

View File

@ -611,7 +611,7 @@ public class HashMap<K,V>
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];