mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-30 13:05:19 +00:00
Removing gratuitous catch of InvalidPathException.
This commit is contained in:
1 file changed
+3
-8
@@ -81,7 +81,6 @@ import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.LinkOption;
|
||||
@@ -3306,13 +3305,9 @@ public final class FilePath implements Serializable {
|
||||
// in case this folder / file will be copied somewhere else,
|
||||
// it becomes the responsibility of that system to check the isDescendant with the existing links
|
||||
// we are not taking the parentRealPath to avoid possible problem
|
||||
try {
|
||||
Path child = currentFileAbsolutePath.normalize();
|
||||
Path parent = parentAbsolutePath.normalize();
|
||||
return child.startsWith(parent);
|
||||
} catch (InvalidPathException e2) { // TODO which method would throw this?
|
||||
throw new IOException(e2);
|
||||
}
|
||||
Path child = currentFileAbsolutePath.normalize();
|
||||
Path parent = parentAbsolutePath.normalize();
|
||||
return child.startsWith(parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user