8205399: Set node color on pinned HashMap.TreeNode deletion

Reviewed-by: martin
This commit is contained in:
Brent Christian 2018-08-10 12:05:53 -07:00
parent 647c7d5344
commit 51d0a9e122
2 changed files with 176 additions and 1 deletions

View file

@ -2145,7 +2145,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
if (replacement != p) {
TreeNode<K,V> pp = replacement.parent = p.parent;
if (pp == null)
root = replacement;
(root = replacement).red = false;
else if (p == pp.left)
pp.left = replacement;
else