Hi,
In JDK 9, 8029891[1] refactored java.util.Properties to store its values
in an internal ConcurrentHashMap, and removed synchronization from
"reader" methods in order to avoid potential hangs/deadlocks during
classloading.
Claes has noticed that there is the possibility of the new 'map' field
being observed with its default value (null), before being set.
After looking at the JSR 133 FAQ[2], I agree with Claes that we should
make 'map' a field final.
Please review my change to do this:
Webrev:
http://cr.openjdk.java.net/~bchristi/8199435/webrev/
Issue:
https://bugs.openjdk.java.net/browse/JDK-8199435
Thanks,
-Brent
1. https://bugs.openjdk.java.net/browse/JDK-8029891
2. https://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#finalRight