src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/SafeThread.java
Print this page
@@ -22,22 +22,20 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
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
* and sun.misc.ManagedLocalsThread, a thread that has it's thread locals, and
* inheritable thread locals erased on construction. Except the run method,
* it is identical to sun.misc.ManagedLocalsThread.
*/
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;
private volatile boolean ran = false;
@@ -79,11 +77,11 @@
UNSAFE.putObject(this, THREAD_LOCALS, null);
UNSAFE.putObject(this, INHERITABLE_THREAD_LOCALS, null);
}
static {
- UNSAFE = Unsafe.getUnsafe();
+ UNSAFE = jdk.internal.misc.Unsafe.getUnsafe();
Class<?> t = Thread.class;
try {
THREAD_LOCALS = UNSAFE.objectFieldOffset(t.getDeclaredField("threadLocals"));
INHERITABLE_THREAD_LOCALS = UNSAFE.objectFieldOffset(t.getDeclaredField("inheritableThreadLocals"));
} catch (Exception e) {