mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
[JENKINS-13202] 646154f refinement: resolveSymlink is documented to return null, not throw an exception, when called on a regular file.
This commit is contained in:
1 parent
a8d9397716
commit
0552f5ad75
3 files changed
+11
No files matched your search
@@ -1110,6 +1110,13 @@ public class Util {
|
||||
if (x2 instanceof UnsupportedOperationException) {
|
||||
return null; // no symlinks on this platform
|
||||
}
|
||||
try {
|
||||
if (Class.forName("java.nio.file.NotLinkException").isInstance(x2)) {
|
||||
return null;
|
||||
}
|
||||
} catch (ClassNotFoundException x3) {
|
||||
assert false : x3; // should be Java 7+ here
|
||||
}
|
||||
if (x2 instanceof IOException) {
|
||||
throw (IOException) x2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user