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.

Cherry-picked-from: 9a2882d
  • Loading branch information
kohsuke authored and marco-miller committed Apr 15, 2014
1 parent 705f5eb commit fd9f273
Showing 1 changed file with 5 additions and 0 deletions.
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 fd9f273

Please sign in to comment.