src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java

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

*** 1543,1553 **** // Support for resetting lock while deserializing private void resetLock() { U.putObjectVolatile(this, LOCK, new Object()); } ! private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); private static final long LOCK; static { try { LOCK = U.objectFieldOffset (CopyOnWriteArrayList.class.getDeclaredField("lock")); --- 1543,1553 ---- // Support for resetting lock while deserializing private void resetLock() { U.putObjectVolatile(this, LOCK, new Object()); } ! private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe(); private static final long LOCK; static { try { LOCK = U.objectFieldOffset (CopyOnWriteArrayList.class.getDeclaredField("lock"));