src/share/classes/java/lang/ProcessBuilder.java

Print this page

        

*** 27,37 **** import java.io.File; 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; import java.util.List; import java.util.Map; --- 27,36 ----
*** 1022,1035 **** return ProcessImpl.start(cmdarray, environment, dir, redirects, redirectErrorStream); ! } catch (IOException e) { String exceptionInfo = ": " + e.getMessage(); Throwable cause = e; ! if (security != null) { // Can not disclose the fail reason for read-protected files. try { security.checkRead(prog); } catch (AccessControlException ace) { exceptionInfo = ""; --- 1021,1034 ---- return ProcessImpl.start(cmdarray, environment, dir, redirects, redirectErrorStream); ! } catch (IOException | IllegalArgumentException e) { String exceptionInfo = ": " + e.getMessage(); Throwable cause = e; ! if ((e instanceof IOException) && security != null) { // Can not disclose the fail reason for read-protected files. try { security.checkRead(prog); } catch (AccessControlException ace) { exceptionInfo = "";