Skip to content

Commit

Permalink
[FIXED JENKINS-21579] UberClassLoader.findResources() improvements
Browse files Browse the repository at this point in the history
This is just a locally patched version, so not meant to be used outside
core.
  • Loading branch information
kohsuke committed Mar 25, 2014
1 parent 69773dc commit 9a2882d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- 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>)
Expand Down
5 changes: 5 additions & 0 deletions core/src/main/java/jenkins/util/AntClassLoader.java
Expand Up @@ -29,6 +29,8 @@
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;
Expand Down Expand Up @@ -72,6 +74,7 @@
* </p>
*
*/
@Restricted(NoExternalUse.class)
public class AntClassLoader extends ClassLoader implements SubBuildListener {

private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
Expand Down Expand Up @@ -245,6 +248,7 @@ private void findNextResource() {
* @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);
Expand Down Expand Up @@ -330,6 +334,7 @@ public AntClassLoader(Project project, Path classpath, boolean parentFirst) {
* 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;
Expand Down

0 comments on commit 9a2882d

Please sign in to comment.