提交 a21f6812 编写于 作者: M mduigou

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
上级 a9624b56
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册