提交 84f03aa2 编写于 作者: K kohsuke

[FIXED HUDSON-4657] in .1330.

    RemoteClassLoader does not persist retrieved classes with package structure
    (<a href="https://hudson.dev.java.net/issues/show_bug.cgi?id=4657">issue 4657</a>)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@22994 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4ca37cfd
......@@ -195,14 +195,17 @@ final class RemoteClassLoader extends URLClassLoader {
}
private File makeResource(String name, byte[] image) throws IOException {
int idx = name.lastIndexOf('/');
File f = File.createTempFile("hudson-remoting","."+name.substring(idx+1));
FileOutputStream fos = new FileOutputStream(f);
File tmpFile = File.createTempFile("hudson-remoting", "");
tmpFile.delete();
File resource = new File(tmpFile, name);
resource.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(resource);
fos.write(image);
fos.close();
f.deleteOnExit();
resource.deleteOnExit();
return f;
return resource;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册