From 763823970e4eb7c0b8c77a03c025ab6b3c163787 Mon Sep 17 00:00:00 2001 From: psandoz Date: Thu, 22 Jan 2015 14:54:15 +0000 Subject: [PATCH] 8069302: Deprecate Unsafe monitor methods in JDK 8u release Reviewed-by: forax, jrose --- src/share/classes/sun/misc/Unsafe.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/share/classes/sun/misc/Unsafe.java b/src/share/classes/sun/misc/Unsafe.java index 1a2e9155e..99e465802 100644 --- a/src/share/classes/sun/misc/Unsafe.java +++ b/src/share/classes/sun/misc/Unsafe.java @@ -846,12 +846,14 @@ public final class Unsafe { 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 @@ public final class Unsafe { * 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. */ -- GitLab