提交 0fcb5881 编写于 作者: L liorha 提交者: Oliver Gondža

Contine the JENKINS-27289 ticket: update the getResources as well

(cherry picked from commit 40e75129)
上级 119fcbbf
......@@ -23,11 +23,9 @@
*/
package hudson.util;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.*;
/**
* {@link ClassLoader} that masks a specified set of classes
......@@ -82,6 +80,16 @@ public class MaskingClassLoader extends ClassLoader {
return super.getResource(name);
}
@Override
public Enumeration<URL> getResources(String name) throws IOException {
for (String mask : masksResources) {
if(name.startsWith(mask))
return null;
}
return super.getResources(name);
}
public synchronized void add(String prefix) {
masksClasses.add(prefix);
if(prefix !=null){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册