8069302: Deprecate Unsafe monitor methods in JDK 8u release
Reviewed-by: forax, jrose
diff --git a/src/share/classes/sun/misc/Unsafe.java b/src/share/classes/sun/misc/Unsafe.java
index 1a2e915..99e4658 100644
--- a/src/share/classes/sun/misc/Unsafe.java
+++ b/src/share/classes/sun/misc/Unsafe.java
@@ -846,12 +846,14 @@
         throws InstantiationException;
 
     /** Lock the object.  It must get unlocked via {@link #monitorExit}. */
+    @Deprecated
     public native void monitorEnter(Object o);
 
     /**
      * Unlock the object.  It must have been locked via {@link
      * #monitorEnter}.
      */
+    @Deprecated
     public native void monitorExit(Object o);
 
     /**
@@ -859,6 +861,7 @@
      * whether the lock succeeded.  If it did, the object must be
      * unlocked via {@link #monitorExit}.
      */
+    @Deprecated
     public native boolean tryMonitorEnter(Object o);
 
     /** Throw the exception without telling the verifier. */