JDK-8054494 : Remove sun.misc.Unsafe.monitorEnter, monitorExit and tryMonitorEnter
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-08-07
  • Updated: 2017-05-17
  • Resolved: 2015-01-15
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.
9 b49Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8155887 :  
Analysis of the use of methods sun.misc.Unsafe.monitorEnter, monitorExit and tryMonitorEnter on jars in maven central indicates they are not widely used (mostly just one artifact and that is only required to work around a class loading issue on Java 6). 

It is proposed these methods be removed. See the discussion on core-libs:


Preliminary patches are here:


Plus another that removes prefetch code that no longer appears to be used:


Suggested release note text: The methods monitorEnter, monitorExit and tryMonitorEnter on sun.misc.Unsafe are removed in JDK 9. These methods are not used within the JDK itself and are very rarely used outside of the JDK.