RFR: 8030016: HashMap.computeIfAbsent generates spurious access event

Brent Christian brent.christian at oracle.com
Fri Dec 13 18:06:58 UTC 2013


On 12/11/13 9:24 PM, Mike Duigou wrote:
> Hello all;
>
> In the review for JDK-8029795 Paul Sandoz noted that HashMap.computeIfAbsent would generate a spurious access event for keys mapped to null when the function returned null. This patch corrects that behaviour.
>
> http://cr.openjdk.java.net/~mduigou/JDK-8030016/0/webrev/
>
> The actual regression test is LinkedHashMap/ComputeIfAbsentAccessOrder.java whereas the changes to Map/Defaults are improvements to the existing tests suggested by this bug (though they would not detect it).
>

The changes look fine to me.

-Brent



More information about the core-libs-dev mailing list