mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-09 18:16:10 +00:00
fixed a bug where XStream activity in plugins wasn't able to resolve classes.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1131 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
54db1b536f
commit
4de81f1eb3
2 files changed
+46
-28
No files matched your search
@@ -119,6 +119,16 @@ public final class PluginManager {
|
||||
|
||||
@Override
|
||||
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||
// first, use the context classloader so that plugins that are loading
|
||||
// can use its own classloader first.
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if(cl!=null)
|
||||
try {
|
||||
return cl.loadClass(name);
|
||||
} catch(ClassNotFoundException e) {
|
||||
// not found. try next
|
||||
}
|
||||
|
||||
for (PluginWrapper p : activePlugins) {
|
||||
try {
|
||||
return p.classLoader.loadClass(name);
|
||||
|
||||
Reference in new issue
Block a user