diff options
Diffstat (limited to 'libjava/classpath/java/security/AccessController.java')
-rw-r--r-- | libjava/classpath/java/security/AccessController.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libjava/classpath/java/security/AccessController.java b/libjava/classpath/java/security/AccessController.java index bc9c2deefbb..93e34b87c22 100644 --- a/libjava/classpath/java/security/AccessController.java +++ b/libjava/classpath/java/security/AccessController.java @@ -142,8 +142,8 @@ public final class AccessController * @param action the <code>PrivilegedExceptionAction</code> whose * <code>run()</code> should be be called. * @return the result of the <code>action.run()</code> method. - * @exception PrivilegedActionException wrapped around any exception that - * is thrown in the <code>run()</code> method. + * @exception PrivilegedActionException wrapped around any checked exception + * that is thrown in the <code>run()</code> method. */ public static Object doPrivileged(PrivilegedExceptionAction action) throws PrivilegedActionException @@ -153,6 +153,10 @@ public final class AccessController { return action.run(); } + catch (RuntimeException e) + { + throw e; + } catch (Exception e) { throw new PrivilegedActionException(e); @@ -178,8 +182,8 @@ public final class AccessController * @param context the <code>AccessControlContext</code> whose protection * domains should be added to the protection domain of the calling class. * @return the result of the <code>action.run()</code> method. - * @exception PrivilegedActionException wrapped around any exception that - * is thrown in the <code>run()</code> method. + * @exception PrivilegedActionException wrapped around any checked exception + * that is thrown in the <code>run()</code> method. */ public static Object doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) @@ -190,6 +194,10 @@ public final class AccessController { return action.run(); } + catch (RuntimeException e) + { + throw e; + } catch (Exception e) { throw new PrivilegedActionException(e); |