JDK-8172048 : Re-examine use of AtomicReference in java.security.Policy
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-12-27
  • Updated: 2017-01-05
  • Resolved: 2017-01-02
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 9
9 b151Fixed
Related Reports
Relates :  
Description
Since java.util.concurrent.AtomicReference was changed to use a VarHandle internally, using it early during bootstrap can lead to hard
to diagnose bootstrap cycles (since VarHandles has to do doPrivileged calls during setup), and as of 9 incurs a small startup overhead for any application run with a security manager.

The use of AtomicReference in java.security.Policy is not really motivated, though, since only the .get/.set methods are used, thus a rather straight-forward fix is to convert the code to use a volatile reference instead.