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

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

@@ -364,11 +364,11 @@
         } while (!compareAndSet(obj, prev, next));
         return next;
     }
 
     private static class CASUpdater<T> extends AtomicLongFieldUpdater<T> {
-        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 final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
 
         CASUpdater(final Class<T> tclass, final String fieldName,

@@ -488,11 +488,11 @@
         }
     }
 
 
     private static class LockedUpdater<T> extends AtomicLongFieldUpdater<T> {
-        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 final long offset;
         private final Class<T> tclass;
         private final Class<?> cclass;
 
         LockedUpdater(final Class<T> tclass, final String fieldName,