JDK 10 RFR of 8176894: Provide specialized implementation for default methods putIfAbsent, computeIfAbsent, computeIfPresent, compute in TreeMap

Tagir F. Valeev amaembo at gmail.com
Fri Mar 17 14:33:37 UTC 2017


Hello!

Great and long-awaited feature, thanks!

I don't see that modCount is checked after calling mappingFunction in
compute/computeIfAbsent/computeIfPresent. Is it possible to break the
Map if mappingFunction changes the Map content? See similar problems
in HashMap:
https://bugs.openjdk.java.net/browse/JDK-8071667
https://bugs.openjdk.java.net/browse/JDK-8172951

With best regards,
Tagir Valeev.


SK> Hi All,

SK> Please, review:
SK> https://bugs.openjdk.java.net/browse/JDK-8176894
SK> http://cr.openjdk.java.net/~skuksenko/corelibs/utils/8176894/webrev.00/

SK> The issue was created for JDK10 in order to don't disturb JDK9 before 
SK> launch.



More information about the core-libs-dev mailing list