RFR: 8030016: HashMap.computeIfAbsent generates spurious access event

Mike Duigou mike.duigou at oracle.com
Thu Dec 12 05:24:43 UTC 2013

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.


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).



More information about the core-libs-dev mailing list