Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-72796] stable context classloader for Computer.threadPoolFor…
…Remoting (jenkinsci#9012) * [JENKINS-72796] stable context classloader for Computer.threadPoolForRemoting Whilst the threadpool used reset the context classloader at the end of any task, it did not ensure that the initial c;lassloader used was anything sepcific, rather it would use whatever the calling threads contextClassLoader was. This is now fixed as we use the Jenkins WebApp classloader (same as the Timer) which is used by (A)PeriodicTasks. Whilst we should really not have a context classloader (aka null) and this should be set where needed by code, almost everywhere in Jenkins the context classloader is already the webapp classloader, and so setting this to be different depending on how things where called would seemingly be a little scary. Arguably this and other context classloaders should be all set to null and any code that wants different should be changed, but this is a larger piece of work that would have potential impact on an unknown number of plugins in the ecosystem, so this fix uses what was set > 90% of the time. * Update core/src/test/java/hudson/model/ComputerTest.java --------- Co-authored-by: Tim Jacomb <[email protected]> (cherry picked from commit 89195cc)
- Loading branch information