提交 0fb1f64f 编写于 作者: A alanb

8023717: (process) ProcessBuilder should catch SecurityException rather than AccessControlException

Reviewed-by: wetmore, alanb
Contributed-by: martinrb@google.com
上级 07df0b0a
......@@ -29,7 +29,6 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.AccessControlException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
......@@ -1033,9 +1032,9 @@ public final class ProcessBuilder
// Can not disclose the fail reason for read-protected files.
try {
security.checkRead(prog);
} catch (AccessControlException ace) {
} catch (SecurityException se) {
exceptionInfo = "";
cause = ace;
cause = se;
}
}
// It's much easier for us to create a high-quality error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册