mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
[JENKINS-42934] A couple of places where FileNotFoundException may be replaced by NoSuchFileException by JVM shenanigans
This commit is contained in:
1 parent
218d0a5516
commit
e603b10088
3 files changed
+7
-4
No files matched your search
@@ -29,6 +29,7 @@ import hudson.Util;
|
||||
import hudson.model.TaskListener;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Test;
|
||||
@@ -63,9 +64,9 @@ public class VirtualFileTest {
|
||||
try {
|
||||
hack.open();
|
||||
fail();
|
||||
} catch (FileNotFoundException x) {
|
||||
} catch (FileNotFoundException | NoSuchFileException x) {
|
||||
// OK
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user