/[classpath]/classpath/java/security/AccessController.java
ViewVC logotype

Diff of /classpath/java/security/AccessController.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8.2.2 by gnu_andrew, Tue Aug 2 20:12:24 2005 UTC revision 1.8.2.3 by gnu_andrew, Wed Nov 2 00:43:36 2005 UTC
# Line 142  public final class AccessController Line 142  public final class AccessController
142     * @param action the <code>PrivilegedExceptionAction</code> whose     * @param action the <code>PrivilegedExceptionAction</code> whose
143     * <code>run()</code> should be be called.     * <code>run()</code> should be be called.
144     * @return the result of the <code>action.run()</code> method.     * @return the result of the <code>action.run()</code> method.
145     * @exception PrivilegedActionException wrapped around any exception that     * @exception PrivilegedActionException wrapped around any checked exception
146     * is thrown in the <code>run()</code> method.     * that is thrown in the <code>run()</code> method.
147     */     */
148    public static Object doPrivileged(PrivilegedExceptionAction action)    public static Object doPrivileged(PrivilegedExceptionAction action)
149      throws PrivilegedActionException      throws PrivilegedActionException
# Line 153  public final class AccessController Line 153  public final class AccessController
153        {        {
154          return action.run();          return action.run();
155        }        }
156        catch (RuntimeException e)
157          {
158            throw e;
159          }
160      catch (Exception e)      catch (Exception e)
161        {        {
162          throw new PrivilegedActionException(e);          throw new PrivilegedActionException(e);
# Line 178  public final class AccessController Line 182  public final class AccessController
182     * @param context the <code>AccessControlContext</code> whose protection     * @param context the <code>AccessControlContext</code> whose protection
183     * domains should be added to the protection domain of the calling class.     * domains should be added to the protection domain of the calling class.
184     * @return the result of the <code>action.run()</code> method.     * @return the result of the <code>action.run()</code> method.
185     * @exception PrivilegedActionException wrapped around any exception that     * @exception PrivilegedActionException wrapped around any checked exception
186     * is thrown in the <code>run()</code> method.     * that is thrown in the <code>run()</code> method.
187     */     */
188    public static Object doPrivileged(PrivilegedExceptionAction action,    public static Object doPrivileged(PrivilegedExceptionAction action,
189                                      AccessControlContext context)                                      AccessControlContext context)
# Line 190  public final class AccessController Line 194  public final class AccessController
194        {        {
195          return action.run();          return action.run();
196        }        }
197        catch (RuntimeException e)
198          {
199            throw e;
200          }
201      catch (Exception e)      catch (Exception e)
202        {        {
203          throw new PrivilegedActionException(e);          throw new PrivilegedActionException(e);

Legend:
Removed from v.1.8.2.2  
changed lines
  Added in v.1.8.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26