Possible HashMap update

Doug Lea dl at cs.oswego.edu
Tue Aug 13 19:54:52 UTC 2013


On 08/12/13 16:30, Mike Duigou wrote:
> Hi Doug;
>
> Several minor recent cleanups and proposed cleanups in HashMap made me wonder how things are progressing on this work. Do you feel it's nearly ready to integrate into the jdk8 repos? What additional work remains? Are you tracking changes going in to the jdk8 repos?
>

While I haven't touched it lately (I've been distracted with a
lot of other things), last I left it, it seemed integratable.
I haven't seen any list traffic that seems applicable,
except for Remi's, that I ought to reply to...

>
>> I've noticed that Doug's version doesn't have the patch from Igor Gerasimov that
>> use Integer.highestOneBit to find the power of two.

It uses the same efficient tableSizeFor method CHM has used for a decade.
Why mess with success? :-)

>>
>> And that the iterators on entrySet, keySet and values doesn't have their method
>> forEachRemaining overriden
>> (unlike java.util.ArrayList).

Are you saying that all iterators should define forEachRemaining?
Seems excessive.

-Doug




> Mike
>
> On Jul 8 2013, at 08:24 , Doug Lea wrote:
>
>>
>> On 07/05/13 04:55, Paul Sandoz wrote:
>>>> I played with these in the lambda repo.
>>>>
>>>> I needed to make the following additional change for things to compile:
>>>>
>>>> --- a/src/share/classes/java/io/ExpiringCache.java    Fri Jul 05 10:04:00 2013 +0200
>>>> +++ b/src/share/classes/java/io/ExpiringCache.java    Fri Jul 05 10:45:10 2013 +0200
>>>> ...
>>
>> Thanks to those chasing this down, now recorded as a CR at:
>>   http://bugs.sun.com/view_bug.do?bug_id=8017219
>>
>> Some might think this is a fun javac corner case to read about,
>> but for present purposes, the moral is that the name of
>> the internal LinkedHashMap.Entry class, even though it is never
>> exported, cannot be changed without impacting re-compilability of
>> some external usages. Fine. We can cope.
>>
>> For people still following along, see updates at...
>>
>> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/HashMap.java?view=log
>>
>> http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/dl/java/util/LinkedHashMap.java?view=log
>
>




More information about the core-libs-dev mailing list