src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java

Print this page
rev 12972 : 8140606: Update library code to use internal Unsafe
Reviewed-by: duke

@@ -131,11 +131,11 @@
         final void reset(long identity) {
             U.putLongVolatile(this, VALUE, identity);
         }
 
         // Unsafe mechanics
-        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+        private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
         private static final long VALUE;
         static {
             try {
                 VALUE = U.objectFieldOffset
                     (Cell.class.getDeclaredField("value"));

@@ -370,11 +370,11 @@
                 break done;
         }
     }
 
     // Unsafe mechanics
-    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
+    private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
     private static final long BASE;
     private static final long CELLSBUSY;
     private static final long PROBE;
     static {
         try {