diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
commit | 3b3101d8b5ae4f08a16c0b7111da6cad41bbd282 (patch) | |
tree | a5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/java/security/AccessController.java | |
parent | 7e55c49d7d91ef9f09e93c1100119b1ab3652446 (diff) | |
download | gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.tar.gz |
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107049 138bc75d-0d04-0410-961f-82ee72b054a4
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); |