[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:
Jesse Glick committed 2012-11-16 13:41:22 -05:00
1 parent a8d9397716
commit 0552f5ad75
3 files changed
+11

No files matched your search

+7
View File
@@ -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;
}