8156841: sun.security.pkcs11.SunPKCS11 poller thread retains a strong reference to the context class loader
authorchegar
Fri, 19 Aug 2016 18:06:46 +0100
changeset 40420 2e02ba62a678
parent 40419 20e2e4b25a40
child 40448 228cfe395a58
8156841: sun.security.pkcs11.SunPKCS11 poller thread retains a strong reference to the context class loader Reviewed-by: dfuchs, jnimeh, valeriep
jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java
--- a/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java	Fri Aug 19 13:50:03 2016 +0200
+++ b/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/SunPKCS11.java	Fri Aug 19 18:06:46 2016 +0100
@@ -818,6 +818,7 @@
         }
         final TokenPoller poller = new TokenPoller(this);
         Thread t = new Thread(null, poller, "Poller " + getName(), 0, false);
+        t.setContextClassLoader(null);
         t.setDaemon(true);
         t.setPriority(Thread.MIN_PRIORITY);
         t.start();