提交 2ca3836d 编写于 作者: K Kohsuke Kawaguchi 提交者: Stephen Connolly

RemoteClassLoader is not honoring the classloader that's passed to the Channel contructor

上级 db0dcf0d
......@@ -238,6 +238,11 @@ public class Channel implements VirtualChannel, IChannel {
/*package*/ final ExecutorService pipeWriter;
/**
* ClassLaoder that remote classloaders should use as the basis.
*/
/*package*/ final ClassLoader baseClassLoader;
/**
* Communication mode.
* @since 1.161
......@@ -356,6 +361,7 @@ public class Channel implements VirtualChannel, IChannel {
if (base==null)
base = getClass().getClassLoader();
this.baseClassLoader = base;
if(export(this,false)!=1)
throw new AssertionError(); // export number 1 is reserved for the channel itself
......
......@@ -54,7 +54,7 @@ final class ImportedClassLoaderTable {
if(r==null) {
// we need to be able to use the same hudson.remoting classes, hence delegate
// to this class loader.
r = RemoteClassLoader.create(getClass().getClassLoader(),classLoaderProxy);
r = RemoteClassLoader.create(channel.baseClassLoader,classLoaderProxy);
classLoaders.put(classLoaderProxy,r);
}
return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册