jdk/src/share/classes/java/lang/ProcessBuilder.java
changeset 17467 374c1cceefff
parent 16877 d12c06e6e2ba
child 18776 c17100862d86
--- a/jdk/src/share/classes/java/lang/ProcessBuilder.java	Tue May 14 14:32:15 2013 +0100
+++ b/jdk/src/share/classes/java/lang/ProcessBuilder.java	Tue May 14 20:16:21 2013 +0400
@@ -29,7 +29,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.FileOutputStream;
 import java.security.AccessControlException;
 import java.util.Arrays;
 import java.util.ArrayList;
@@ -1024,10 +1023,10 @@
                                      dir,
                                      redirects,
                                      redirectErrorStream);
-        } catch (IOException e) {
+        } catch (IOException | IllegalArgumentException e) {
             String exceptionInfo = ": " + e.getMessage();
             Throwable cause = e;
-            if (security != null) {
+            if ((e instanceof IOException) && security != null) {
                 // Can not disclose the fail reason for read-protected files.
                 try {
                     security.checkRead(prog);