classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] RFC: runtime exceptions thrown in AccessController


From: Nicolas Geoffray
Subject: [cp-patches] RFC: runtime exceptions thrown in AccessController
Date: Wed, 05 Oct 2005 18:23:36 +0200
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050913)

Hi,

I changed implementation of AccessController.doPrivileged methods that hava a PrivilegedExceptionAction argument. When a runtime exception is catched, it throws it, and doesn't wrap it in a PrivilegedExceptionAction object.

I'm new in committing. Should I get a write access to the cvs?

Cheers,
Nicolas

2005-10-05  Nicolas Geoffray  <address@hidden>

       * java/security/AccessController.java:
        (doPrivileged): if the exception is a Runtime exception,
        then throw the exception directly, otherwise wrap it


--- java/security/AccessController.java 2005-09-06 15:30:44.000000000 +0200
+++ java/security/AccessController.java 2005-09-17 01:43:48.000000000 +0200
@@ -153,6 +153,10 @@
       {
         return action.run();
       }
+    catch (RuntimeException e)
+      {
+        throw e;
+      }
     catch (Exception e)
       {
         throw new PrivilegedActionException(e);
@@ -190,6 +194,10 @@
       {
         return action.run();
       }
+    catch (RuntimeException e)
+      {
+        throw e;
+      }  
     catch (Exception e)
       {
         throw new PrivilegedActionException(e);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]