RFR 8005698 : Handle Frequent HashMap Collisions with Balanced Trees

Brent Christian brent.christian at oracle.com
Mon Jun 3 05:56:32 UTC 2013

On 6/1/13 9:59 AM, Doug Lea wrote:
> On cross-checking with ConcurrentHashMap, all looks OK except that
> it should include a fix for a problem introduced once when changing
> comparison orders and not picked up until recently retesting CHM. (sorry.)
> Here's a diff against webrev 0.3

Thank you.  I take it this change:

>               TreeNode r, pl, pr; // check both sides
> !             if ((pr = p.right) != null
>                    (r = getTreeNode(h, k, pr, cc)) != null)

should be

   if ((pr = p.right) != null &&
as with the similar change later in the file.

I went ahead and created a new webrev.  It includes this change, and the 
comment changes suggested by Alan:


A .diff with the HashMap.java changes between webrev.03 and .04 are 
here, in case it's helpful:


Thanks again,

More information about the core-libs-dev mailing list