a patch for new default methods in Map + more
Peter Levart
peter.levart at gmail.com
Fri Jan 4 13:34:01 PST 2013
On 01/04/2013 08:07 PM, Remi Forax wrote:
> On 01/04/2013 07:09 PM, Doug Lea wrote:
>> On 01/04/13 12:11, Peter Levart wrote:
>>> Hi,
>>>
>>> I propose a patch for some new default methods in j.u.Map and some more:
>>>
>>> http://dl.dropbox.com/u/101777488/jdk8-lambda/Map/webrev.02/index.html
>>>
>> Thanks for redoing these as a webrev!
> Peter, you should not add Objects.equals() here, you can use it if you
> know that a key will be null,
> but not if you don't know. You have to write the null check in the
> method and let the VM do the profiling.
> With that, users that never use a HashMap with null key may not pay the
> extra cost of the null check.
> If you use Objects.equals, because it will be also used in a method with
> a value that is null, the VM will always do the check.
>
> Rémi
Ok, I'll change this in next revision. I'll just wait some time to see
if there's anything else to do.
Regards, Peter
More information about the lambda-dev
mailing list