If threads created by the executor have a reference to the context classloader this may cause a leak. See: https://wiki.apache.org/tomcat/MemoryLeakProtection#cclThreadSpawnedByWebApp Bug: 517107 Change-Id: If79c1ebd3f9cf733fd88a5fce38fd46ff0d08d10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>tags/v4.11.0.201803080745-r
@@ -71,6 +71,7 @@ public class WorkQueue { | |||
public Thread newThread(Runnable taskBody) { | |||
Thread thr = baseFactory.newThread(taskBody); | |||
thr.setName("JGit-WorkQueue"); //$NON-NLS-1$ | |||
thr.setContextClassLoader(null); | |||
thr.setDaemon(true); | |||
return thr; | |||
} |