JDK-8199435 : Unsafe publication of java.util.Properties.map
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 9,10,11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-03-11
  • Updated: 2018-11-14
  • Resolved: 2018-06-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b19Fixed
Related Reports
Relates :  
Description
JDK-8029891 refactored java.util.Properties to use a transient ConcurrentHashMap that is read from without synchronization. However, I think this implementation opens up the possibility of the map being observed as null in certain methods (such as get) when called from other threads.

One way to fix this would be by making the map field final (which would necessitate using something like Unsafe.putObjectVolatile to set the field during deserialization).