8156841: sun.security.pkcs11.SunPKCS11 poller thread retains a strong reference to the context class loader
Reviewed-by: dfuchs, jnimeh, valeriep
--- 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();