From ce3943d27d9c6913335b7ba56f86905083522193 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Wed, 28 Aug 2013 14:07:30 +0100 Subject: [PATCH] 8023717: (process) ProcessBuilder should catch SecurityException rather than AccessControlException Reviewed-by: wetmore, alanb --- jdk/src/share/classes/java/lang/ProcessBuilder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/java/lang/ProcessBuilder.java b/jdk/src/share/classes/java/lang/ProcessBuilder.java index 0cb7febe533..53fbc489a68 100644 --- a/jdk/src/share/classes/java/lang/ProcessBuilder.java +++ b/jdk/src/share/classes/java/lang/ProcessBuilder.java @@ -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