mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-20 11:50:25 +00:00
8170733: HashMap.HashIterator.remove method does not use cached value for the hash code
Reviewed-by: martin, dl, shade
This commit is contained in:
parent
0c0db99a87
commit
36779a0df3
@ -1502,8 +1502,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
if (modCount != expectedModCount)
|
||||
throw new ConcurrentModificationException();
|
||||
current = null;
|
||||
K key = p.key;
|
||||
removeNode(hash(key), key, null, false, false);
|
||||
removeNode(p.hash, p.key, null, false, false);
|
||||
expectedModCount = modCount;
|
||||
}
|
||||
}
|
||||
|
||||
@ -731,8 +731,7 @@ public class LinkedHashMap<K,V>
|
||||
if (modCount != expectedModCount)
|
||||
throw new ConcurrentModificationException();
|
||||
current = null;
|
||||
K key = p.key;
|
||||
removeNode(hash(key), key, null, false, false);
|
||||
removeNode(p.hash, p.key, null, false, false);
|
||||
expectedModCount = modCount;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user