Browse Source

Set context classloader to null in WorkQueue

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
Matthias Sohn 6 years ago
parent
commit
95f868f246
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java

+ 1
- 0
org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java View File

@@ -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;
}

Loading…
Cancel
Save