8140606: Update library code to use internal Unsafe
authorchegar
Wed, 11 Nov 2015 11:33:40 +0000
changeset 33699 26c7c103b4d9
parent 33559 f242d4332f56
child 33700 615eaeb62fda
child 33894 3aaf31520e96
8140606: Update library code to use internal Unsafe Reviewed-by: alanb, mchung, psandoz, weijun
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SafeThread.java
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SafeThread.java	Wed Jul 05 20:59:28 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SafeThread.java	Wed Nov 11 11:33:40 2015 +0000
@@ -24,8 +24,6 @@
  */
 package com.sun.org.apache.xml.internal.utils;
 
-import sun.misc.Unsafe;
-
 /**
  * This is a combination of ThreadControllerWrapper's inner class SafeThread
  * that was introduced as a fix for CR 6607339
@@ -35,7 +33,7 @@
  */
 public class SafeThread 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;
 
@@ -81,7 +79,7 @@
     }
 
     static {
-        UNSAFE = Unsafe.getUnsafe();
+        UNSAFE = jdk.internal.misc.Unsafe.getUnsafe();
         Class<?> t = Thread.class;
         try {
             THREAD_LOCALS = UNSAFE.objectFieldOffset(t.getDeclaredField("threadLocals"));