提交 9a2882dd 编写于 作者: K Kohsuke Kawaguchi

[FIXED JENKINS-21579] UberClassLoader.findResources() improvements

This is just a locally patched version, so not meant to be used outside
core.
上级 69773dc9
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Fixed a slow down in resource loading caused by fix to JENKINS-18677.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21579">issue 21579</a>)
<li class=rfe>
Option to download metadata directly from Jenkins rather than going through the browser.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-19081">issue 19081</a>)
......
......@@ -29,6 +29,8 @@ import org.apache.tools.ant.util.JavaEnvUtils;
import org.apache.tools.ant.util.LoaderUtils;
import org.apache.tools.ant.util.ReflectUtil;
import org.apache.tools.ant.util.VectorSet;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import java.io.ByteArrayOutputStream;
import java.io.File;
......@@ -72,6 +74,7 @@ import java.util.jar.Manifest;
* </p>
*
*/
@Restricted(NoExternalUse.class)
public class AntClassLoader extends ClassLoader implements SubBuildListener {
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
......@@ -245,6 +248,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @param classpath The classpath to use to load classes.
*/
public AntClassLoader(ClassLoader parent, Project project, Path classpath) {
super(parent); // KK patch for JENKINS-21579
setParent(parent);
setClassPath(classpath);
setProject(project);
......@@ -330,6 +334,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* load the a class through this loader.
*/
public AntClassLoader(ClassLoader parent, boolean parentFirst) {
super(parent); // KK patch for JENKINS-21579
setParent(parent);
project = null;
this.parentFirst = parentFirst;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册