From 8f523f3a1047919d3563daf1ef47ba87336ebe89 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 15 Nov 2005 23:20:01 +0000 Subject: Imported GNU Classpath 0.19 + gcj-import-20051115. * sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. From-SVN: r107049 --- libjava/classpath/java/security/AccessController.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'libjava/classpath/java/security/AccessController.java') 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 PrivilegedExceptionAction whose * run() should be be called. * @return the result of the action.run() method. - * @exception PrivilegedActionException wrapped around any exception that - * is thrown in the run() method. + * @exception PrivilegedActionException wrapped around any checked exception + * that is thrown in the run() 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 AccessControlContext whose protection * domains should be added to the protection domain of the calling class. * @return the result of the action.run() method. - * @exception PrivilegedActionException wrapped around any exception that - * is thrown in the run() method. + * @exception PrivilegedActionException wrapped around any checked exception + * that is thrown in the run() 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); -- cgit v1.2.3