Skip to content
Permalink
Browse files

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

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 fd9f273f3645fc670e1283bbed7967f789475c86
Showing with 5 additions and 0 deletions.
  1. +5 −0 core/src/main/java/jenkins/util/AntClassLoader.java
@@ -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;
@@ -72,6 +74,7 @@
* </p>
*
*/
@Restricted(NoExternalUse.class)
public class AntClassLoader extends ClassLoader implements SubBuildListener {

private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
@@ -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);
@@ -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;

0 comments on commit fd9f273

Please sign in to comment.
You can’t perform that action at this time.