diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2018-01-08 10:14:33 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-02-14 21:39:24 +0100 |
commit | 95f868f2463ed9de814cff8dbd8f0f90965d4c63 (patch) | |
tree | 7aa0b1ceeea50a697e59723bfee2bc0dd22aecbc /org.eclipse.jgit/src/org/eclipse/jgit/lib/internal | |
parent | 6e0f8bacd4a9ff70868f07e5eaa7463d235619f8 (diff) | |
download | jgit-95f868f2463ed9de814cff8dbd8f0f90965d4c63.tar.gz jgit-95f868f2463ed9de814cff8dbd8f0f90965d4c63.zip |
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>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/lib/internal')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java index e3f65ae7ba..8f8aad52d7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/WorkQueue.java @@ -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; } |