[JENKINS-50237] Pick up Remoting with automatic ProxyException; and avoid BuildException to begin with.

This commit is contained in:
Jesse Glick committed 2018-03-19 16:57:15 -04:00
1 parent ca61ed7e35
commit 7b9a3e4448
3 files changed
+67 -2

No files matched your search

+7 -1
View File
@@ -138,6 +138,7 @@ import static hudson.Util.fixEmpty;
import static hudson.Util.isSymlink;
import java.util.Collections;
import org.apache.tools.ant.BuildException;
/**
* {@link File} like object with remoting support.
@@ -1829,7 +1830,12 @@ public final class FilePath implements Serializable {
throw new IOException("Expecting Ant GLOB pattern, but saw '"+includes+"'. See http://ant.apache.org/manual/Types/fileset.html for syntax");
FileSet fs = Util.createFileSet(dir,includes,excludes);
fs.setDefaultexcludes(defaultExcludes);
DirectoryScanner ds = fs.getDirectoryScanner(new Project());
DirectoryScanner ds;
try {
ds = fs.getDirectoryScanner(new Project());
} catch (BuildException x) {
throw new IOException(x.getMessage());
}
String[] files = ds.getIncludedFiles();
return files;
}