8156841: sun.security.pkcs11.SunPKCS11 poller thread retains a strong reference to the context class loader

Reviewed-by: dfuchs, jnimeh, valeriep
This commit is contained in:
Chris Hegarty 2016-08-19 18:06:46 +01:00
parent 4316d705f2
commit 2f2de77c1d

View File

@ -818,6 +818,7 @@ public final class SunPKCS11 extends AuthProvider {
}
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();