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

Diff of /classpath/java/security/AccessControlException.java

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

revision 1.4 by mark, Tue Jan 22 22:27:00 2002 UTC revision 1.5 by ericb, Sun Feb 24 04:25:17 2002 UTC
# Line 1  Line 1 
1  /* AccessControlException.java -- Permission is denied  /* AccessControlException.java -- Permission is denied
2     Copyright (C) 1998 Free Software Foundation, Inc.     Copyright (C) 1998, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 39  package java.security; Line 39  package java.security;
39    
40  /**  /**
41   * This exception is thrown when the <code>AccessController</code> denies   * This exception is thrown when the <code>AccessController</code> denies
42   * an attempt to perform an operation.   * an attempt to perform an operation. This often keeps track of the
43     * permission that was not granted.
44   *   *
45   * @version 0.0   * @author Aaron M. Renn <arenn@urbanophile.com>
46   *   * @see AccessController
47   * @author Aaron M. Renn (arenn@urbanophile.com)   * @status updated to 1.4
48   */   */
49  public class AccessControlException extends SecurityException  public class AccessControlException extends SecurityException
50  {  {
51    /**    /**
52     * The <code>Permission</code> associated with this exception     * Compatible with JDK 1.1+.
53       */
54      private static final long serialVersionUID = 5138225684096988535L;
55    
56      /**
57       * The <code>Permission</code> associated with this exception.
58       *
59       * @serial the permission
60     */     */
61    private Permission perm;    private final Permission perm;
62    
63    /**    /**
64     * This method initializes a new instance of <code>AccessControlException</code>     * Create a new instance with a descriptive error message, and a null
65     * with a descriptive error message.  There will be no <code>Permission</code>     * <code>Permission</code> object.
    * object associated with this exception.  
66     *     *
67     * @param msg The descriptive error message     * @param msg the descriptive error message
68     */     */
69    public AccessControlException(String msg)    public AccessControlException(String msg)
70    {    {
71      super(msg);      this(msg, null);
72    }    }
73    
74    /**    /**
75     * This method initializes a new instance of <code>AccessControlException</code>     * Create a new instance with a descriptive error message and an associated
76     * with a descriptive error message and an instance of <code>Permission</code>     * <code>Permission</code> object.
    * that is the permission that caused the exception to be thrown.  
77     *     *
78     * @param msg The descriptive error message     * @param msg the descriptive error message
79     * @param perm The <code>Permission</code> object that caused this exception.     * @param perm the permission that caused this
80     */     */
81    public AccessControlException(String msg, Permission perm)    public AccessControlException(String msg, Permission perm)
82    {    {
# Line 82  public class AccessControlException exte Line 88  public class AccessControlException exte
88     * This method returns the <code>Permission</code> object that caused     * This method returns the <code>Permission</code> object that caused
89     * this exception to be thrown.     * this exception to be thrown.
90     *     *
91     * @return The requested <code>Permission</code> object, or <code>null</code> if none is available.     * @return the denied permission, or null
92     */     */
93    public Permission getPermission()    public Permission getPermission()
94    {    {
95      return (perm);      return perm;
96    }    }
97  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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