8146038: CleanerImpl should not depend on ManagedLocalsThread
authorchegar
Tue, 22 Dec 2015 21:30:48 +0000
changeset 34824 3c29cc262748
parent 34823 f3f6509be104
child 34825 d315dac0f1a8
8146038: CleanerImpl should not depend on ManagedLocalsThread Reviewed-by: rriggs
jdk/src/java.base/share/classes/jdk/internal/misc/CleanerImpl.java
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/CleanerImpl.java	Tue Dec 22 14:12:55 2015 -0500
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/CleanerImpl.java	Tue Dec 22 21:30:48 2015 +0000
@@ -39,7 +39,6 @@
 import java.util.function.Function;
 
 import sun.misc.InnocuousThread;
-import sun.misc.ManagedLocalsThread;
 
 /**
  * CleanerImpl manages a set of object references and corresponding cleaning actions.
@@ -130,8 +129,8 @@
      */
     public void run() {
         Thread t = Thread.currentThread();
-        ManagedLocalsThread mlThread = (t instanceof ManagedLocalsThread)
-                ? (ManagedLocalsThread) t
+        InnocuousThread mlThread = (t instanceof InnocuousThread)
+                ? (InnocuousThread) t
                 : null;
         while (!phantomCleanableList.isListEmpty() ||
                 !weakCleanableList.isListEmpty() ||
@@ -787,4 +786,3 @@
     }
 
 }
-