RFR 8023463 Update HashMap and LinkedHashMap to use bins/buckets or trees (red/black)
paul.sandoz at oracle.com
Sun Aug 25 09:43:47 UTC 2013
On Aug 24, 2013, at 1:35 AM, Brent Christian <brent.christian at oracle.com> wrote:
> On 8/22/13 5:01 AM, Paul Sandoz wrote:
>> On Aug 21, 2013, at 6:47 PM, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
>>> I updated the webrev and replaced TreeBinSplitBackToEntries.java with:
> > Another tweak to ensure untreeify is tested on resize (use the same
> > URL above). I think at this point the tests are in reasonable shape
> > and are on a par with previous tests.
> The new MapBinToFromTreeTest code looks good. I confirmed that it hits the 4 main cases in split() (tree/untreeify for loHead/hiHead).
> (FWIW, I don't believe the entire split() tree ever lands all in one bin (loHead and hiHead are never null), though it's possible that it could.)
I did not cover those cases, but it should be easy to do so. IIUC either can be null but not both, if e.hash & bit == 0 or not for all in e in the tree.
> I agree that we should check back on the code coverage results and update the tests as needed.
> I've focused on looking at portions of HashMap that I recall being tricky (split, treeify, etc). So far it all looks fine to me.
More information about the core-libs-dev