diff --git a/jdk/make/src/classes/build/tools/x11wrappergen/WrapperGenerator.java b/jdk/make/src/classes/build/tools/x11wrappergen/WrapperGenerator.java index e3a68c42afb..60888904b89 100644 --- a/jdk/make/src/classes/build/tools/x11wrappergen/WrapperGenerator.java +++ b/jdk/make/src/classes/build/tools/x11wrappergen/WrapperGenerator.java @@ -841,7 +841,7 @@ public class WrapperGenerator { pw.println("// This file is an automatically generated file, please do not edit this file, modify the WrapperGenerator.java file instead !\n" ); pw.println("package "+package_name+";\n"); - pw.println("import sun.misc.*;\n"); + pw.println("import jdk.internal.misc.Unsafe;\n"); pw.println("import sun.util.logging.PlatformLogger;"); String baseClass = stp.getBaseClass(); if (baseClass == null) { @@ -941,7 +941,7 @@ public class WrapperGenerator { pw.println("// This file is an automatically generated file, please do not edit this file, modify the WrapperGenerator.java file instead !\n" ); pw.println("package "+package_name+";\n"); - pw.println("import sun.misc.Unsafe;\n"); + pw.println("import jdk.internal.misc.Unsafe;\n"); pw.println("class " + ft.getName() + " {"); pw.println("\tprivate static Unsafe unsafe = XlibWrapper.unsafe;"); pw.println("\tprivate boolean __executed = false;"); diff --git a/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java b/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java index a7a954597e5..9cb294f67f0 100644 --- a/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java +++ b/jdk/src/java.base/aix/classes/sun/nio/ch/AixPollPort.java @@ -34,7 +34,7 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantLock; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * AsynchronousChannelGroup implementation based on the AIX pollset framework. diff --git a/jdk/src/java.base/linux/classes/sun/nio/ch/EPoll.java b/jdk/src/java.base/linux/classes/sun/nio/ch/EPoll.java index bb2b9e5171f..72fe9950621 100644 --- a/jdk/src/java.base/linux/classes/sun/nio/ch/EPoll.java +++ b/jdk/src/java.base/linux/classes/sun/nio/ch/EPoll.java @@ -26,7 +26,7 @@ package sun.nio.ch; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Provides access to the Linux epoll facility. diff --git a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxDosFileAttributeView.java b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxDosFileAttributeView.java index 11a40a0e862..dba638e8da9 100644 --- a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxDosFileAttributeView.java +++ b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxDosFileAttributeView.java @@ -29,7 +29,7 @@ import java.nio.file.attribute.*; import java.util.Map; import java.util.Set; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.UnixNativeDispatcher.*; import static sun.nio.fs.UnixConstants.*; diff --git a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java index d3960b27701..18b880c550f 100644 --- a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java +++ b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java @@ -29,7 +29,7 @@ import java.nio.file.*; import java.nio.ByteBuffer; import java.io.IOException; import java.util.*; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.UnixConstants.*; import static sun.nio.fs.LinuxNativeDispatcher.*; diff --git a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java index 19079d72878..02af6a539d6 100644 --- a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java +++ b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java @@ -30,7 +30,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.UnixNativeDispatcher.*; import static sun.nio.fs.UnixConstants.*; diff --git a/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueue.java b/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueue.java index b98dacdfc53..f2be5339a76 100644 --- a/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueue.java +++ b/jdk/src/java.base/macosx/classes/sun/nio/ch/KQueue.java @@ -26,7 +26,7 @@ package sun.nio.ch; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Provides access to the BSD kqueue facility. diff --git a/jdk/src/java.base/share/classes/java/io/File.java b/jdk/src/java.base/share/classes/java/io/File.java index 63e6d571ed2..6137d0acd29 100644 --- a/jdk/src/java.base/share/classes/java/io/File.java +++ b/jdk/src/java.base/share/classes/java/io/File.java @@ -2184,10 +2184,10 @@ public class File private static final long PATH_OFFSET; private static final long PREFIX_LENGTH_OFFSET; - private static final sun.misc.Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; static { try { - sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); PATH_OFFSET = unsafe.objectFieldOffset( File.class.getDeclaredField("path")); PREFIX_LENGTH_OFFSET = unsafe.objectFieldOffset( diff --git a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java index f2bf5f01795..779257e87c0 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -40,7 +40,7 @@ import java.util.HashMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import static java.io.ObjectStreamClass.processQueue; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.reflect.misc.ReflectUtil; /** diff --git a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java index aa516a15d67..762706c1e88 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectStreamClass.java @@ -48,7 +48,7 @@ import java.util.HashSet; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.reflect.CallerSensitive; import sun.reflect.Reflection; import sun.reflect.ReflectionFactory; diff --git a/jdk/src/java.base/share/classes/java/lang/Class.java b/jdk/src/java.base/share/classes/java/lang/Class.java index fc1e6b9f0f3..77913c3187d 100644 --- a/jdk/src/java.base/share/classes/java/lang/Class.java +++ b/jdk/src/java.base/share/classes/java/lang/Class.java @@ -55,7 +55,7 @@ import java.util.Map; import java.util.HashMap; import java.util.Objects; import java.util.StringJoiner; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import jdk.internal.HotSpotIntrinsicCandidate; import sun.reflect.CallerSensitive; import sun.reflect.ConstantPool; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java index c70b9db3097..3c9e141461f 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java @@ -25,7 +25,7 @@ package java.lang.invoke; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import java.lang.reflect.Method; import java.util.Arrays; import sun.invoke.util.VerifyAccess; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index 5f821977c0f..9a43947d34e 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -27,7 +27,7 @@ package java.lang.invoke; import jdk.internal.org.objectweb.asm.*; import sun.invoke.util.BytecodeDescriptor; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.security.action.GetPropertyAction; import java.io.FilePermission; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java index bcfa877fbf1..dda16ad9eda 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java @@ -775,7 +775,7 @@ class InvokerBytecodeGenerator { // Sample classes from each package we are willing to bind to statically: java.lang.Object.class, java.util.Arrays.class, - sun.misc.Unsafe.class + jdk.internal.misc.Unsafe.class //MethodHandle.class already covered }; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java index 29bd6dbf512..f983b2d792a 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java @@ -50,7 +50,7 @@ class MethodHandleNatives { static native int getMembers(Class defc, String matchName, String matchSig, int matchFlags, Class caller, int skip, MemberName[] results); - /// Field layout queries parallel to sun.misc.Unsafe: + /// Field layout queries parallel to jdk.internal.misc.Unsafe: static native long objectFieldOffset(MemberName self); // e.g., returns vmindex static native long staticFieldOffset(MemberName self); // e.g., returns vmindex static native Object staticFieldBase(MemberName self); // e.g., returns clazz diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java index aae6053acf2..c449f4cb591 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java @@ -27,7 +27,7 @@ package java.lang.invoke; import java.security.AccessController; import java.security.PrivilegedAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * This class consists exclusively of static names internal to the diff --git a/jdk/src/java.base/share/classes/java/math/BigDecimal.java b/jdk/src/java.base/share/classes/java/math/BigDecimal.java index 7214950c489..a126e9339f1 100644 --- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java +++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java @@ -3726,12 +3726,12 @@ public class BigDecimal extends Number implements Comparable { } private static class UnsafeHolder { - private static final sun.misc.Unsafe unsafe; + private static final jdk.internal.misc.Unsafe unsafe; private static final long intCompactOffset; private static final long intValOffset; static { try { - unsafe = sun.misc.Unsafe.getUnsafe(); + unsafe = jdk.internal.misc.Unsafe.getUnsafe(); intCompactOffset = unsafe.objectFieldOffset (BigDecimal.class.getDeclaredField("intCompact")); intValOffset = unsafe.objectFieldOffset diff --git a/jdk/src/java.base/share/classes/java/math/BigInteger.java b/jdk/src/java.base/share/classes/java/math/BigInteger.java index 80330c8c4e4..4471de71198 100644 --- a/jdk/src/java.base/share/classes/java/math/BigInteger.java +++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java @@ -4526,12 +4526,12 @@ public class BigInteger extends Number implements Comparable { // Support for resetting final fields while deserializing private static class UnsafeHolder { - private static final sun.misc.Unsafe unsafe; + private static final jdk.internal.misc.Unsafe unsafe; private static final long signumOffset; private static final long magOffset; static { try { - unsafe = sun.misc.Unsafe.getUnsafe(); + unsafe = jdk.internal.misc.Unsafe.getUnsafe(); signumOffset = unsafe.objectFieldOffset (BigInteger.class.getDeclaredField("signum")); magOffset = unsafe.objectFieldOffset diff --git a/jdk/src/java.base/share/classes/java/net/Inet6Address.java b/jdk/src/java.base/share/classes/java/net/Inet6Address.java index e51064fbd31..0daac2f2b03 100644 --- a/jdk/src/java.base/share/classes/java/net/Inet6Address.java +++ b/jdk/src/java.base/share/classes/java/net/Inet6Address.java @@ -576,11 +576,11 @@ class Inet6Address extends InetAddress { }; private static final long FIELDS_OFFSET; - private static final sun.misc.Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; static { try { - sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); FIELDS_OFFSET = unsafe.objectFieldOffset( Inet6Address.class.getDeclaredField("holder6")); UNSAFE = unsafe; diff --git a/jdk/src/java.base/share/classes/java/net/InetAddress.java b/jdk/src/java.base/share/classes/java/net/InetAddress.java index a2d89b25d31..fa6cb4dbd61 100644 --- a/jdk/src/java.base/share/classes/java/net/InetAddress.java +++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java @@ -1493,11 +1493,11 @@ class InetAddress implements java.io.Serializable { } private static final long FIELDS_OFFSET; - private static final sun.misc.Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; static { try { - sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); FIELDS_OFFSET = unsafe.objectFieldOffset( InetAddress.class.getDeclaredField("holder") ); diff --git a/jdk/src/java.base/share/classes/java/net/InetSocketAddress.java b/jdk/src/java.base/share/classes/java/net/InetSocketAddress.java index 2bdfdc25102..8e2a2fc925c 100644 --- a/jdk/src/java.base/share/classes/java/net/InetSocketAddress.java +++ b/jdk/src/java.base/share/classes/java/net/InetSocketAddress.java @@ -303,10 +303,10 @@ public class InetSocketAddress } private static final long FIELDS_OFFSET; - private static final sun.misc.Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; static { try { - sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); FIELDS_OFFSET = unsafe.objectFieldOffset( InetSocketAddress.class.getDeclaredField("holder")); UNSAFE = unsafe; diff --git a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java index 953a78b8206..a9c6005d28c 100644 --- a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java +++ b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java @@ -26,7 +26,7 @@ package java.nio; import java.io.FileDescriptor; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** diff --git a/jdk/src/java.base/share/classes/java/util/Random.java b/jdk/src/java.base/share/classes/java/util/Random.java index f22dca758f7..78e4953bfe8 100644 --- a/jdk/src/java.base/share/classes/java/util/Random.java +++ b/jdk/src/java.base/share/classes/java/util/Random.java @@ -34,7 +34,7 @@ import java.util.stream.IntStream; import java.util.stream.LongStream; import java.util.stream.StreamSupport; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * An instance of this class is used to generate a stream of diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java b/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java index ee553e8f261..45389ac9109 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java @@ -2775,7 +2775,7 @@ public class CompletableFuture implements Future, CompletionStage { } // 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 RESULT; private static final long STACK; private static final long NEXT; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java index 4c1180dc11b..b2c2d2aa701 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java @@ -297,7 +297,7 @@ public class ConcurrentHashMap extends AbstractMap * Table accesses require volatile/atomic reads, writes, and * CASes. Because there is no other way to arrange this without * adding further indirections, we use intrinsics - * (sun.misc.Unsafe) operations. + * (jdk.internal.misc.Unsafe) operations. * * We use the top (sign) bit of Node hash fields for control * purposes -- it is available anyway because of addressing @@ -3287,7 +3287,7 @@ public class ConcurrentHashMap extends AbstractMap return true; } - 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 LOCKSTATE; static { try { @@ -6330,7 +6330,7 @@ public class ConcurrentHashMap extends AbstractMap } // 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 SIZECTL; private static final long TRANSFERINDEX; private static final long BASECOUNT; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java index 0991efc9e28..4f8fdd92c49 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java @@ -326,7 +326,7 @@ public class ConcurrentLinkedDeque // 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 PREV; private static final long ITEM; private static final long NEXT; @@ -1608,7 +1608,7 @@ public class ConcurrentLinkedDeque // 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 HEAD; private static final long TAIL; static { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java index 6e68ed0d333..d302b6f55b8 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java @@ -929,7 +929,7 @@ public class ConcurrentLinkedQueue extends AbstractQueue // 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 HEAD; private static final long TAIL; private static final long ITEM; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java index 60d3c42e8bb..745de306bc1 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java @@ -534,7 +534,7 @@ public class ConcurrentSkipListMap extends AbstractMap // 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; private static final long NEXT; @@ -614,7 +614,7 @@ public class ConcurrentSkipListMap extends AbstractMap } // 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 RIGHT; static { try { @@ -3596,7 +3596,7 @@ public class ConcurrentSkipListMap extends AbstractMap } // 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 HEAD; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java index 96dff4f8989..2ecacf8e185 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java @@ -510,7 +510,7 @@ public class ConcurrentSkipListSet U.putObjectVolatile(this, MAP, map); } - 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 MAP; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java index 771d8b44fa9..65baf7c87c8 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java @@ -1545,7 +1545,7 @@ public class CopyOnWriteArrayList private void resetLock() { U.putObjectVolatile(this, LOCK, new Object()); } - 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 LOCK; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java b/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java index eebc700f932..24c154e2f05 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java @@ -754,7 +754,7 @@ public abstract class CountedCompleter extends ForkJoinTask { protected void setRawResult(T t) { } // 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 PENDING; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/Exchanger.java b/jdk/src/java.base/share/classes/java/util/concurrent/Exchanger.java index 4c03c25d03d..503d2500578 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/Exchanger.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/Exchanger.java @@ -625,7 +625,7 @@ public class Exchanger { } // 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 BOUND; private static final long SLOT; private static final long MATCH; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java index d2490854abf..e4e91a1a187 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java @@ -1337,7 +1337,7 @@ public class ForkJoinPool extends AbstractExecutorService { } // Unsafe mechanics. Note that some are (and must be) the same as in FJP - 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 QLOCK; private static final int ABASE; private static final int ASHIFT; @@ -3452,7 +3452,7 @@ public class ForkJoinPool extends AbstractExecutorService { } // 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 CTL; private static final long RUNSTATE; private static final int ABASE; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java index 6a373367d0e..2b714dff9b4 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java @@ -1517,7 +1517,7 @@ public abstract class ForkJoinTask implements Future, Serializable { } // 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 STATUS; static { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java index e98ba993c30..54d8931de4f 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java @@ -185,7 +185,7 @@ public class ForkJoinWorkerThread extends Thread { } // Set up to allow setting thread fields in constructor - 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 THREADLOCALS; private static final long INHERITABLETHREADLOCALS; private static final long INHERITEDACCESSCONTROLCONTEXT; @@ -248,7 +248,7 @@ public class ForkJoinWorkerThread extends Thread { */ private static ThreadGroup createThreadGroup() { try { - sun.misc.Unsafe u = sun.misc.Unsafe.getUnsafe(); + jdk.internal.misc.Unsafe u = jdk.internal.misc.Unsafe.getUnsafe(); long tg = u.objectFieldOffset (Thread.class.getDeclaredField("group")); long gp = u.objectFieldOffset diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java b/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java index 62c2bfcb291..27943fd7cb6 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java @@ -484,7 +484,7 @@ public class FutureTask implements RunnableFuture { } // 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 STATE; private static final long RUNNER; private static final long WAITERS; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java index 8127fe3a34f..02ffd871b7a 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java @@ -538,7 +538,7 @@ public class LinkedTransferQueue extends AbstractQueue private static final long serialVersionUID = -3375979862319811754L; // 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 ITEM; private static final long NEXT; private static final long WAITER; @@ -1564,7 +1564,7 @@ public class LinkedTransferQueue extends AbstractQueue // 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 HEAD; private static final long TAIL; private static final long SWEEPVOTES; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java b/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java index 9ef99361f45..e8d91e557c0 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java @@ -1137,7 +1137,7 @@ public class Phaser { // 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 STATE; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java index 7432529305e..652fd6958cf 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java @@ -1010,7 +1010,7 @@ public class PriorityBlockingQueue extends AbstractQueue } // 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 ALLOCATIONSPINLOCK; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java index 0d6e66bf516..03462ac1ef4 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java @@ -1596,7 +1596,7 @@ public class SubmissionPublisher implements Flow.Publisher, } // 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 CTL; private static final long TAIL; private static final long HEAD; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java index 029aa9c895c..069d0a6b851 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java @@ -283,7 +283,7 @@ public class SynchronousQueue extends AbstractQueue } // 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 MATCH; private static final long NEXT; @@ -509,7 +509,7 @@ public class SynchronousQueue extends AbstractQueue } // 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 HEAD; static { try { @@ -575,7 +575,7 @@ public class SynchronousQueue extends AbstractQueue } // 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 ITEM; private static final long NEXT; @@ -817,7 +817,7 @@ public class SynchronousQueue extends AbstractQueue } } - 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 HEAD; private static final long TAIL; private static final long CLEANME; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java index f9542d504d7..f4bf5a4fef2 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java @@ -1050,7 +1050,7 @@ public class ThreadLocalRandom extends Random { } // 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 SEED; private static final long PROBE; private static final long SECONDARY; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java index b2a23903c22..01fc1c2c0d7 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java @@ -49,7 +49,7 @@ package java.util.concurrent.atomic; public class AtomicBoolean implements java.io.Serializable { private static final long serialVersionUID = 4654671469794556979L; - 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 { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java index 19b341819b9..96e13f60ed8 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java @@ -54,7 +54,7 @@ import java.util.function.IntUnaryOperator; public class AtomicInteger extends Number implements java.io.Serializable { private static final long serialVersionUID = 6214790243416807050L; - 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 { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java index 2ea9a272008..f3a262b65b4 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java @@ -49,7 +49,7 @@ import java.util.function.IntUnaryOperator; public class AtomicIntegerArray implements java.io.Serializable { private static final long serialVersionUID = 2862133569453604235L; - 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 int ABASE; private static final int ASHIFT; private final int[] array; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java index 06e517d1a2b..1ec99ccc42f 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java @@ -367,7 +367,7 @@ public abstract class AtomicIntegerFieldUpdater { */ private static class AtomicIntegerFieldUpdaterImpl extends AtomicIntegerFieldUpdater { - 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 tclass; private final Class cclass; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java index b919f1e3c7a..2af5d1dd07f 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java @@ -54,7 +54,7 @@ import java.util.function.LongUnaryOperator; public class AtomicLong extends Number implements java.io.Serializable { private static final long serialVersionUID = 1927816293512124184L; - 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; /** diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java index d1af039aa61..58aa1875b19 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java @@ -48,7 +48,7 @@ import java.util.function.LongUnaryOperator; public class AtomicLongArray implements java.io.Serializable { private static final long serialVersionUID = -2308431214976778248L; - 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 int ABASE; private static final int ASHIFT; private final long[] array; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java index 5cb20197126..870a311aebf 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java @@ -366,7 +366,7 @@ public abstract class AtomicLongFieldUpdater { } private static class CASUpdater extends AtomicLongFieldUpdater { - 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 tclass; private final Class cclass; @@ -490,7 +490,7 @@ public abstract class AtomicLongFieldUpdater { private static class LockedUpdater extends AtomicLongFieldUpdater { - 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 tclass; private final Class cclass; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java index b49118b1c60..8204c3fcc61 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicMarkableReference.java @@ -190,7 +190,7 @@ public class AtomicMarkableReference { // 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 PAIR; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java index dbc668582f7..9d4d2a385c7 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java @@ -49,7 +49,7 @@ import java.util.function.UnaryOperator; public class AtomicReference implements java.io.Serializable { private static final long serialVersionUID = -1848883965231344442L; - 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 { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java index cce148e6f0e..03f950d43e0 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java @@ -52,7 +52,7 @@ import java.util.function.UnaryOperator; public class AtomicReferenceArray implements java.io.Serializable { private static final long serialVersionUID = -6209656149925076980L; - 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 ARRAY; private static final int ABASE; private static final int ASHIFT; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java index f33498c8f9f..aa89aead91b 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java @@ -284,7 +284,7 @@ public abstract class AtomicReferenceFieldUpdater { private static final class AtomicReferenceFieldUpdaterImpl extends AtomicReferenceFieldUpdater { - 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 tclass; private final Class vclass; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java index 40ceeb2650f..fd520d7d889 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicStampedReference.java @@ -190,7 +190,7 @@ public class AtomicStampedReference { // 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 PAIR; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java index 18d720fa391..153a3adc378 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/Striped64.java @@ -133,7 +133,7 @@ abstract class Striped64 extends Number { } // 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 { @@ -372,7 +372,7 @@ abstract class Striped64 extends Number { } // 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; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java index 7f6de8971ce..06f50846234 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java @@ -1821,7 +1821,7 @@ public abstract class AbstractQueuedLongSynchronizer * are at it, we do the same for other CASable fields (which could * otherwise be done with atomic field updaters). */ - 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 STATE; private static final long HEAD; private static final long TAIL; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java index 1f36435bb4c..3d604a63214 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java @@ -524,7 +524,7 @@ public abstract class AbstractQueuedSynchronizer return U.compareAndSwapObject(this, NEXT, expect, update); } - 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 NEXT; static final long PREV; private static final long THREAD; @@ -2285,7 +2285,7 @@ public abstract class AbstractQueuedSynchronizer * are at it, we do the same for other CASable fields (which could * otherwise be done with atomic field updaters). */ - 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 STATE; private static final long HEAD; private static final long TAIL; diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java index 297de583436..a82d2d9f736 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java @@ -394,7 +394,7 @@ public class LockSupport { } // Hotspot implementation via intrinsics API - 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 PARKBLOCKER; private static final long SECONDARY; static { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java index c41b4285a67..a2c627aed3b 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java @@ -1501,7 +1501,7 @@ public class ReentrantReadWriteLock } // 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 TID; static { try { diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java index d6895996d91..0e8252587b5 100644 --- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java +++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java @@ -1398,7 +1398,7 @@ public class StampedLock implements java.io.Serializable { } // 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 STATE; private static final long WHEAD; private static final long WTAIL; diff --git a/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java b/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java index c40886fafa6..2d82625780e 100644 --- a/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java +++ b/jdk/src/java.base/share/classes/java/util/zip/CRC32C.java @@ -28,7 +28,7 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import jdk.internal.HotSpotIntrinsicCandidate; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.nio.ch.DirectBuffer; /** diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java index 39bbbc625a1..1d74a0da741 100644 --- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java +++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java @@ -30,7 +30,7 @@ import java.io.Console; import java.io.FileDescriptor; import java.security.ProtectionDomain; import java.security.AccessController; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** A repository of "shared secrets", which are a mechanism for calling implementation-private methods in another package without diff --git a/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java b/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java index 60544e25f38..6c5cb3f5563 100644 --- a/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java +++ b/jdk/src/java.base/share/classes/sun/invoke/anon/AnonymousClassLoader.java @@ -78,7 +78,7 @@ public class AnonymousClassLoader { this.hostClass = hostClass; } - public static AnonymousClassLoader make(sun.misc.Unsafe unsafe, Class hostClass) { + public static AnonymousClassLoader make(jdk.internal.misc.Unsafe unsafe, Class hostClass) { if (unsafe == null) throw new NullPointerException(); return new AnonymousClassLoader(hostClass); } @@ -189,13 +189,13 @@ public class AnonymousClassLoader { private static int fakeNameCounter = 99999; // ignore two warnings on this line: - private static sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + private static jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); // preceding line requires that this class be on the boot class path private static final Method defineAnonymousClass; static { Method dac = null; - Class unsafeClass = unsafe.getClass(); + Class unsafeClass = unsafe.getClass(); try { dac = unsafeClass.getMethod("defineAnonymousClass", Class.class, diff --git a/jdk/src/java.base/share/classes/sun/misc/InnocuousThread.java b/jdk/src/java.base/share/classes/sun/misc/InnocuousThread.java index 78a0a185f0a..a9c129cd79e 100644 --- a/jdk/src/java.base/share/classes/sun/misc/InnocuousThread.java +++ b/jdk/src/java.base/share/classes/sun/misc/InnocuousThread.java @@ -36,7 +36,7 @@ import java.util.concurrent.atomic.AtomicInteger; * ThreadGroup and supports the ability to erase ThreadLocals. */ public final class InnocuousThread extends ManagedLocalsThread { - private static final Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; private static final ThreadGroup INNOCUOUSTHREADGROUP; private static final AccessControlContext ACC; private static final long INHERITEDACCESSCONTROLCONTEXT; @@ -92,7 +92,7 @@ public final class InnocuousThread extends ManagedLocalsThread { }); // Find and use topmost ThreadGroup as parent of new group - UNSAFE = Unsafe.getUnsafe(); + UNSAFE = jdk.internal.misc.Unsafe.getUnsafe(); Class tk = Thread.class; Class gk = ThreadGroup.class; diff --git a/jdk/src/java.base/share/classes/sun/misc/ManagedLocalsThread.java b/jdk/src/java.base/share/classes/sun/misc/ManagedLocalsThread.java index f520ca384b6..58d9013c261 100644 --- a/jdk/src/java.base/share/classes/sun/misc/ManagedLocalsThread.java +++ b/jdk/src/java.base/share/classes/sun/misc/ManagedLocalsThread.java @@ -30,7 +30,7 @@ package sun.misc; * locals erased on construction. */ public class ManagedLocalsThread extends Thread { - private static final Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; private static final long THREAD_LOCALS; private static final long INHERITABLE_THREAD_LOCALS; @@ -77,7 +77,7 @@ public class ManagedLocalsThread extends Thread { } static { - UNSAFE = Unsafe.getUnsafe(); + UNSAFE = jdk.internal.misc.Unsafe.getUnsafe(); Class t = Thread.class; try { THREAD_LOCALS = UNSAFE.objectFieldOffset diff --git a/jdk/src/java.base/share/classes/sun/nio/ch/NativeObject.java b/jdk/src/java.base/share/classes/sun/nio/ch/NativeObject.java index e4e4366289a..839b64df8ad 100644 --- a/jdk/src/java.base/share/classes/sun/nio/ch/NativeObject.java +++ b/jdk/src/java.base/share/classes/sun/nio/ch/NativeObject.java @@ -29,7 +29,7 @@ package sun.nio.ch; // Formerly in sun.misc import java.nio.ByteOrder; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; // ## In the fullness of time, this class will be eliminated diff --git a/jdk/src/java.base/share/classes/sun/nio/ch/Util.java b/jdk/src/java.base/share/classes/sun/nio/ch/Util.java index 614850577e0..fd428149999 100644 --- a/jdk/src/java.base/share/classes/sun/nio/ch/Util.java +++ b/jdk/src/java.base/share/classes/sun/nio/ch/Util.java @@ -35,7 +35,7 @@ import java.nio.channels.*; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.misc.Cleaner; import sun.security.action.GetPropertyAction; diff --git a/jdk/src/java.base/share/classes/sun/nio/fs/Cancellable.java b/jdk/src/java.base/share/classes/sun/nio/fs/Cancellable.java index 648d4089ce8..4e283a5f157 100644 --- a/jdk/src/java.base/share/classes/sun/nio/fs/Cancellable.java +++ b/jdk/src/java.base/share/classes/sun/nio/fs/Cancellable.java @@ -26,7 +26,7 @@ package sun.nio.fs; import sun.misc.ManagedLocalsThread; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import java.util.concurrent.ExecutionException; /** diff --git a/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffer.java b/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffer.java index 1009bda5de9..8acc0c198a1 100644 --- a/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffer.java +++ b/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffer.java @@ -25,7 +25,7 @@ package sun.nio.fs; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.misc.Cleaner; /** diff --git a/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffers.java b/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffers.java index 41ae7ea8835..728d96eb2b3 100644 --- a/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffers.java +++ b/jdk/src/java.base/share/classes/sun/nio/fs/NativeBuffers.java @@ -25,7 +25,7 @@ package sun.nio.fs; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Factory for native buffers. diff --git a/jdk/src/java.base/share/classes/sun/reflect/AccessorGenerator.java b/jdk/src/java.base/share/classes/sun/reflect/AccessorGenerator.java index 96f64ec1847..3b06f550f0f 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/AccessorGenerator.java +++ b/jdk/src/java.base/share/classes/sun/reflect/AccessorGenerator.java @@ -26,7 +26,7 @@ package sun.reflect; import java.lang.reflect.*; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** Shared functionality for all accessor generators */ diff --git a/jdk/src/java.base/share/classes/sun/reflect/ClassDefiner.java b/jdk/src/java.base/share/classes/sun/reflect/ClassDefiner.java index 6b1b43c841b..b4d50095939 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/ClassDefiner.java +++ b/jdk/src/java.base/share/classes/sun/reflect/ClassDefiner.java @@ -27,7 +27,7 @@ package sun.reflect; import java.security.AccessController; import java.security.PrivilegedAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** Utility class which assists in calling Unsafe.defineClass() by creating a new class loader which delegates to the one needed in diff --git a/jdk/src/java.base/share/classes/sun/reflect/FieldInfo.java b/jdk/src/java.base/share/classes/sun/reflect/FieldInfo.java index 6972155fb10..72abd07b861 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/FieldInfo.java +++ b/jdk/src/java.base/share/classes/sun/reflect/FieldInfo.java @@ -38,7 +38,7 @@ public class FieldInfo { private String signature; private int modifiers; // This is compatible with the old reflection implementation's - // "slot" value to allow sun.misc.Unsafe to work + // "slot" value to allow jdk.internal.misc.Unsafe to work private int slot; // Not really necessary to provide a constructor since the VM diff --git a/jdk/src/java.base/share/classes/sun/reflect/MagicAccessorImpl.java b/jdk/src/java.base/share/classes/sun/reflect/MagicAccessorImpl.java index 59624366141..af1382f6a5e 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/MagicAccessorImpl.java +++ b/jdk/src/java.base/share/classes/sun/reflect/MagicAccessorImpl.java @@ -32,7 +32,7 @@ package sun.reflect; fields and methods of other classes. It is used to hold the code for dynamically-generated FieldAccessorImpl and MethodAccessorImpl subclasses. (Use of the word "unsafe" was avoided in this class's - name to avoid confusion with {@link sun.misc.Unsafe}.)

+ name to avoid confusion with {@link jdk.internal.misc.Unsafe}.)

The bug fix for 4486457 also necessitated disabling verification for this class and all subclasses, as opposed to just diff --git a/jdk/src/java.base/share/classes/sun/reflect/ReflectionFactory.java b/jdk/src/java.base/share/classes/sun/reflect/ReflectionFactory.java index 35445331168..24aa225b89e 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/ReflectionFactory.java +++ b/jdk/src/java.base/share/classes/sun/reflect/ReflectionFactory.java @@ -44,7 +44,7 @@ import sun.reflect.misc.ReflectUtil; subversion of both the language and the verifier. For this reason, they are all instance methods, and access to the constructor of this factory is guarded by a security check, in similar style to - {@link sun.misc.Unsafe}.

+ {@link jdk.internal.misc.Unsafe}.

*/ public class ReflectionFactory { diff --git a/jdk/src/java.base/share/classes/sun/reflect/UnsafeFieldAccessorImpl.java b/jdk/src/java.base/share/classes/sun/reflect/UnsafeFieldAccessorImpl.java index 8e830999f13..d54c7f8a6f6 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/UnsafeFieldAccessorImpl.java +++ b/jdk/src/java.base/share/classes/sun/reflect/UnsafeFieldAccessorImpl.java @@ -27,9 +27,9 @@ package sun.reflect; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; -/** Base class for sun.misc.Unsafe-based FieldAccessors. The +/** Base class for jdk.internal.misc.Unsafe-based FieldAccessors. The observation is that there are only nine types of fields from the standpoint of reflection code: the eight primitive types and Object. Using class Unsafe instead of generated bytecodes saves diff --git a/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedFieldAccessorImpl.java b/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedFieldAccessorImpl.java index a40ca950881..5cf6c5ee5c7 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedFieldAccessorImpl.java +++ b/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedFieldAccessorImpl.java @@ -27,10 +27,10 @@ package sun.reflect; import java.lang.reflect.Field; import java.lang.reflect.Modifier; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** - * Base class for sun.misc.Unsafe-based FieldAccessors for fields with + * Base class for jdk.internal.misc.Unsafe-based FieldAccessors for fields with * final or volatile qualifiers. These differ from unqualified * versions in that (1) they check for read-only status (2) they use * the volatile forms of Unsafe get/put methods. (When accessed via diff --git a/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl.java b/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl.java index 04219f1f49c..74b40571eab 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl.java +++ b/jdk/src/java.base/share/classes/sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl.java @@ -28,9 +28,9 @@ package sun.reflect; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessController; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; -/** Base class for sun.misc.Unsafe-based FieldAccessors for final or +/** Base class for jdk.internal.misc.Unsafe-based FieldAccessors for final or static volatile fields. */ abstract class UnsafeQualifiedStaticFieldAccessorImpl diff --git a/jdk/src/java.base/share/classes/sun/reflect/UnsafeStaticFieldAccessorImpl.java b/jdk/src/java.base/share/classes/sun/reflect/UnsafeStaticFieldAccessorImpl.java index f07a17cdd5b..e87ba31b543 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/UnsafeStaticFieldAccessorImpl.java +++ b/jdk/src/java.base/share/classes/sun/reflect/UnsafeStaticFieldAccessorImpl.java @@ -28,9 +28,9 @@ package sun.reflect; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessController; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; -/** Base class for sun.misc.Unsafe-based FieldAccessors for static +/** Base class for jdk.internal.misc.Unsafe-based FieldAccessors for static fields. The observation is that there are only nine types of fields from the standpoint of reflection code: the eight primitive types and Object. Using class Unsafe instead of generated diff --git a/jdk/src/java.base/share/classes/sun/reflect/misc/ReflectUtil.java b/jdk/src/java.base/share/classes/sun/reflect/misc/ReflectUtil.java index cee12a029ea..c90a630e2fa 100644 --- a/jdk/src/java.base/share/classes/sun/reflect/misc/ReflectUtil.java +++ b/jdk/src/java.base/share/classes/sun/reflect/misc/ReflectUtil.java @@ -337,7 +337,7 @@ public final class ReflectUtil { /** * Checks if {@code Class cls} is a VM-anonymous class - * as defined by {@link sun.misc.Unsafe#defineAnonymousClass} + * as defined by {@link jdk.internal.misc.Unsafe#defineAnonymousClass} * (not to be confused with a Java Language anonymous inner class). */ public static boolean isVMAnonymousClass(Class cls) { diff --git a/jdk/src/java.base/solaris/classes/sun/nio/ch/EventPortWrapper.java b/jdk/src/java.base/solaris/classes/sun/nio/ch/EventPortWrapper.java index 5355f7f2911..30a454c070f 100644 --- a/jdk/src/java.base/solaris/classes/sun/nio/ch/EventPortWrapper.java +++ b/jdk/src/java.base/solaris/classes/sun/nio/ch/EventPortWrapper.java @@ -31,7 +31,7 @@ import java.util.BitSet; import java.util.HashMap; import java.util.Map; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.security.action.GetIntegerAction; import static sun.nio.ch.SolarisEventPort.*; diff --git a/jdk/src/java.base/solaris/classes/sun/nio/ch/SolarisEventPort.java b/jdk/src/java.base/solaris/classes/sun/nio/ch/SolarisEventPort.java index f5427d6fb7a..298727dccd4 100644 --- a/jdk/src/java.base/solaris/classes/sun/nio/ch/SolarisEventPort.java +++ b/jdk/src/java.base/solaris/classes/sun/nio/ch/SolarisEventPort.java @@ -28,7 +28,7 @@ package sun.nio.ch; import java.nio.channels.spi.AsynchronousChannelProvider; import java.util.concurrent.RejectedExecutionException; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Provides an AsynchronousChannelGroup implementation based on the Solaris 10 diff --git a/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java b/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java index f3ba7b3e6f0..7027bd96c2a 100644 --- a/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java +++ b/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java @@ -29,7 +29,7 @@ import java.nio.file.*; import java.nio.file.attribute.*; import java.util.*; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.UnixConstants.*; import static sun.nio.fs.SolarisConstants.*; diff --git a/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisWatchService.java b/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisWatchService.java index 0c1165ff5f4..7a31d13b3a6 100644 --- a/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisWatchService.java +++ b/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisWatchService.java @@ -30,7 +30,7 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.*; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.UnixConstants.*; diff --git a/jdk/src/java.base/windows/classes/sun/nio/ch/Iocp.java b/jdk/src/java.base/windows/classes/sun/nio/ch/Iocp.java index 699df050030..715046a0ede 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/ch/Iocp.java +++ b/jdk/src/java.base/windows/classes/sun/nio/ch/Iocp.java @@ -36,7 +36,7 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.security.AccessController; import sun.security.action.GetPropertyAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Windows implementation of AsynchronousChannelGroup encapsulating an I/O diff --git a/jdk/src/java.base/windows/classes/sun/nio/ch/PendingIoCache.java b/jdk/src/java.base/windows/classes/sun/nio/ch/PendingIoCache.java index 72d8d0ea9d9..b8f7cba96f3 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/ch/PendingIoCache.java +++ b/jdk/src/java.base/windows/classes/sun/nio/ch/PendingIoCache.java @@ -27,7 +27,7 @@ package sun.nio.ch; import java.nio.channels.*; import java.util.*; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Maintains a mapping of pending I/O requests (identified by the address of diff --git a/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java b/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java index 991944e96c7..9d5945364b9 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java +++ b/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java @@ -33,7 +33,7 @@ import java.io.IOException; import java.security.AccessControlContext; import java.security.AccessController; import java.security.PrivilegedAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Windows implementation of AsynchronousServerSocketChannel using overlapped I/O. diff --git a/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java b/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java index 1880548f68f..3e96279de41 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java +++ b/jdk/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java @@ -34,7 +34,7 @@ import java.io.IOException; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Windows implementation of AsynchronousSocketChannel using overlapped I/O. diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java index 208435dc97e..02226053f8d 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java @@ -28,7 +28,7 @@ package sun.nio.fs; import java.nio.file.attribute.*; import java.util.concurrent.TimeUnit; import java.security.AccessController; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.security.action.GetPropertyAction; import static sun.nio.fs.WindowsNativeDispatcher.*; diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java index e86c385a622..cf0d23fea2b 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java @@ -33,7 +33,7 @@ import java.util.concurrent.ExecutorService; import java.io.*; import java.util.*; import java.security.AccessController; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.nio.ch.ThreadPool; import sun.security.util.SecurityConstants; diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsLinkSupport.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsLinkSupport.java index 56f996d99b3..80d4809b6a5 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsLinkSupport.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsLinkSupport.java @@ -30,7 +30,7 @@ import java.io.IOException; import java.io.IOError; import java.security.AccessController; import java.security.PrivilegedAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.WindowsNativeDispatcher.*; import static sun.nio.fs.WindowsConstants.*; diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java index 82a4bc3aecd..820edbfd9a8 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java @@ -27,7 +27,7 @@ package sun.nio.fs; import java.security.AccessController; import java.security.PrivilegedAction; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Win32 and library calls. diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java index fb432271cc6..da3460592f4 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java @@ -29,7 +29,7 @@ import java.nio.file.ProviderMismatchException; import java.nio.file.attribute.*; import java.util.*; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.WindowsNativeDispatcher.*; import static sun.nio.fs.WindowsConstants.*; diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java index 64ef12a9855..774d248840c 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java @@ -31,7 +31,7 @@ import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.io.IOException; import java.util.*; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.WindowsNativeDispatcher.*; import static sun.nio.fs.WindowsConstants.*; diff --git a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsWatchService.java b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsWatchService.java index 0ea288e1ecb..8e28e8471ac 100644 --- a/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsWatchService.java +++ b/jdk/src/java.base/windows/classes/sun/nio/fs/WindowsWatchService.java @@ -36,7 +36,7 @@ import java.util.Map; import java.util.Set; import com.sun.nio.file.ExtendedWatchEventModifier; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import static sun.nio.fs.WindowsNativeDispatcher.*; import static sun.nio.fs.WindowsConstants.*; diff --git a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java index e9afc44069e..a025ae85e5f 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java @@ -25,7 +25,7 @@ package sun.awt; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import javax.accessibility.AccessibleContext; import java.awt.*; diff --git a/jdk/src/java.desktop/share/classes/sun/font/StrikeCache.java b/jdk/src/java.desktop/share/classes/sun/font/StrikeCache.java index 99319c7d16a..094327fe124 100644 --- a/jdk/src/java.desktop/share/classes/sun/font/StrikeCache.java +++ b/jdk/src/java.desktop/share/classes/sun/font/StrikeCache.java @@ -37,7 +37,7 @@ import sun.java2d.Disposer; import sun.java2d.pipe.BufferedContext; import sun.java2d.pipe.RenderQueue; import sun.java2d.pipe.hw.AccelGraphicsConfig; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** diff --git a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java index 5f5118a8767..57f24a4eada 100644 --- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java +++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RenderBuffer.java @@ -25,7 +25,7 @@ package sun.java2d.pipe; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** diff --git a/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java b/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java index da637f0625c..66d20f2458b 100644 --- a/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java +++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java @@ -25,7 +25,7 @@ package sun.swing; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import java.awt.*; import javax.swing.*; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDConstants.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDConstants.java index 26e2cdbbba3..f2dbfc67abf 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDConstants.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDConstants.java @@ -31,7 +31,7 @@ import java.nio.ByteOrder; import java.util.Arrays; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Motif DnD protocol global constants and convenience routines. diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java index da80dda9ceb..a476628e7c5 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDragSourceProtocol.java @@ -33,7 +33,7 @@ import java.awt.dnd.InvalidDnDOperationException; import java.util.Map; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * XDragSourceProtocol implementation for Motif DnD protocol. diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java index 735bf144df2..e71236a6ff9 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MotifDnDDropTargetProtocol.java @@ -33,7 +33,7 @@ import java.awt.event.MouseEvent; import java.io.IOException; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * XDropTargetProtocol implementation for Motif DnD protocol. diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/Native.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/Native.java index f61654643f2..e4d5b23ca76 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/Native.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/Native.java @@ -25,7 +25,7 @@ package sun.awt.X11; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import java.util.Vector; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/UnsafeXDisposerRecord.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/UnsafeXDisposerRecord.java index 099b558eef6..6de0c0310ef 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/UnsafeXDisposerRecord.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/UnsafeXDisposerRecord.java @@ -24,7 +24,7 @@ */ package sun.awt.X11; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.util.logging.PlatformLogger; class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord { diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/WindowPropertyGetter.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/WindowPropertyGetter.java index 0cda6fa2fdf..00d3134eea8 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/WindowPropertyGetter.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/WindowPropertyGetter.java @@ -26,7 +26,7 @@ package sun.awt.X11; import java.util.*; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; public class WindowPropertyGetter { private static Unsafe unsafe = XlibWrapper.unsafe; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java index 01d17fdad21..eeb46347b56 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java @@ -55,7 +55,7 @@ package sun.awt.X11; * @since 1.5 */ -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import java.util.HashMap; public final class XAtom { diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDragSourceProtocol.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDragSourceProtocol.java index a4661e5c687..26265be30bc 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDragSourceProtocol.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDragSourceProtocol.java @@ -35,7 +35,7 @@ import java.util.Map; import sun.util.logging.PlatformLogger; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * XDragSourceProtocol implementation for XDnD protocol. diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java index 074f37dd753..e1698a424b8 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java @@ -35,7 +35,7 @@ import java.io.IOException; import sun.util.logging.PlatformLogger; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * XDropTargetProtocol implementation for XDnD protocol. diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java index 1e59ce16e82..d2a6c9f8c04 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java @@ -41,7 +41,7 @@ import sun.awt.SunToolkit; import sun.awt.dnd.SunDropTargetContextPeer; import sun.awt.dnd.SunDropTargetEvent; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * The XDropTargetContextPeer is the class responsible for handling diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java index f54f4bd9e66..0c2acc44c1c 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java @@ -25,7 +25,7 @@ package sun.awt.X11; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.util.logging.PlatformLogger; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java index b0b0d0728ed..e34298a13e7 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java @@ -27,7 +27,7 @@ package sun.awt.X11; import java.util.Hashtable; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.util.logging.PlatformLogger; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XQueryTree.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XQueryTree.java index dede21f6e30..7c3641d4c42 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XQueryTree.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XQueryTree.java @@ -27,7 +27,7 @@ package sun.awt.X11; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; public class XQueryTree { private static Unsafe unsafe = XlibWrapper.unsafe; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTranslateCoordinates.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTranslateCoordinates.java index 42a3a42844e..bc08e2077dd 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTranslateCoordinates.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTranslateCoordinates.java @@ -27,7 +27,7 @@ package sun.awt.X11; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; public class XTranslateCoordinates { private static Unsafe unsafe = XlibWrapper.unsafe; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java index 61d2cbc380d..9fce6afe284 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java @@ -31,7 +31,7 @@ package sun.awt.X11; import sun.awt.IconInfo; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import java.awt.Insets; import java.awt.Frame; import java.awt.Rectangle; diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java index bc9e3667a1f..9edec019bb4 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java @@ -27,7 +27,7 @@ package sun.awt.X11; import java.security.AccessController; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; import sun.security.action.GetPropertyAction; final class XlibWrapper { diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h b/jdk/src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h index 09de3bee098..b0c75b313fa 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h @@ -65,7 +65,7 @@ tojava */ tojava tojava package sun.awt.X11; tojava import java.util.Hashtable; -tojava import sun.misc.Unsafe; +tojava import jdk.internal.misc.Unsafe; tojava tojava import sun.util.logging.PlatformLogger; tojava diff --git a/jdk/src/java.management/share/classes/sun/management/BaseOperatingSystemImpl.java b/jdk/src/java.management/share/classes/sun/management/BaseOperatingSystemImpl.java index a40e0b04f93..dc165747c98 100644 --- a/jdk/src/java.management/share/classes/sun/management/BaseOperatingSystemImpl.java +++ b/jdk/src/java.management/share/classes/sun/management/BaseOperatingSystemImpl.java @@ -28,7 +28,7 @@ package sun.management; import java.lang.management.OperatingSystemMXBean; import java.lang.management.ManagementFactory; import javax.management.ObjectName; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; /** * Implementation class for the operating system. diff --git a/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java b/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java index 740f483a44f..3cc0acb8ffe 100644 --- a/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java +++ b/jdk/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java @@ -51,7 +51,7 @@ public class ManagementFactoryHelper { static { // make sure that the management lib is loaded within // java.lang.management.ManagementFactory - sun.misc.Unsafe.getUnsafe().ensureClassInitialized(ManagementFactory.class); + jdk.internal.misc.Unsafe.getUnsafe().ensureClassInitialized(ManagementFactory.class); } private static final VMManagement jvm = new VMManagementImpl(); diff --git a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KerberosSecrets.java b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KerberosSecrets.java index 44f2f0f94aa..5d68c4ec3a8 100644 --- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KerberosSecrets.java +++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KerberosSecrets.java @@ -26,7 +26,7 @@ package sun.security.krb5; import javax.security.auth.kerberos.KeyTab; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; public class KerberosSecrets { private static final Unsafe unsafe = Unsafe.getUnsafe(); diff --git a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java index 4b60b1a99c2..e60507fe443 100644 --- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java +++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java @@ -187,10 +187,10 @@ public class PrincipalName implements Cloneable { } private static final long NAME_STRINGS_OFFSET; - private static final sun.misc.Unsafe UNSAFE; + private static final jdk.internal.misc.Unsafe UNSAFE; static { try { - sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); NAME_STRINGS_OFFSET = unsafe.objectFieldOffset( PrincipalName.class.getDeclaredField("nameStrings")); UNSAFE = unsafe;