jdk/src/share/classes/java/lang/ProcessBuilder.java
changeset 17467 374c1cceefff
parent 16877 d12c06e6e2ba
child 18776 c17100862d86
equal deleted inserted replaced
17466:e2c55878b26a 17467:374c1cceefff
    27 
    27 
    28 import java.io.File;
    28 import java.io.File;
    29 import java.io.IOException;
    29 import java.io.IOException;
    30 import java.io.InputStream;
    30 import java.io.InputStream;
    31 import java.io.OutputStream;
    31 import java.io.OutputStream;
    32 import java.io.FileOutputStream;
       
    33 import java.security.AccessControlException;
    32 import java.security.AccessControlException;
    34 import java.util.Arrays;
    33 import java.util.Arrays;
    35 import java.util.ArrayList;
    34 import java.util.ArrayList;
    36 import java.util.List;
    35 import java.util.List;
    37 import java.util.Map;
    36 import java.util.Map;
  1022             return ProcessImpl.start(cmdarray,
  1021             return ProcessImpl.start(cmdarray,
  1023                                      environment,
  1022                                      environment,
  1024                                      dir,
  1023                                      dir,
  1025                                      redirects,
  1024                                      redirects,
  1026                                      redirectErrorStream);
  1025                                      redirectErrorStream);
  1027         } catch (IOException e) {
  1026         } catch (IOException | IllegalArgumentException e) {
  1028             String exceptionInfo = ": " + e.getMessage();
  1027             String exceptionInfo = ": " + e.getMessage();
  1029             Throwable cause = e;
  1028             Throwable cause = e;
  1030             if (security != null) {
  1029             if ((e instanceof IOException) && security != null) {
  1031                 // Can not disclose the fail reason for read-protected files.
  1030                 // Can not disclose the fail reason for read-protected files.
  1032                 try {
  1031                 try {
  1033                     security.checkRead(prog);
  1032                     security.checkRead(prog);
  1034                 } catch (AccessControlException ace) {
  1033                 } catch (AccessControlException ace) {
  1035                     exceptionInfo = "";
  1034                     exceptionInfo = "";