/[classpath]/classpath/java/util/PropertyPermission.java
ViewVC logotype

Diff of /classpath/java/util/PropertyPermission.java

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

revision 1.9 by ericb, Fri Feb 22 07:08:04 2002 UTC revision 1.10 by ericb, Wed Mar 6 19:44:44 2002 UTC
# Line 111  public final class PropertyPermission ex Line 111  public final class PropertyPermission ex
111     *     *
112     * @param name the name of the property     * @param name the name of the property
113     * @param actions the action string     * @param actions the action string
114       * @throws NullPointerException if name is null
115     * @throws IllegalArgumentException if name string contains an     * @throws IllegalArgumentException if name string contains an
116     *         illegal wildcard or actions string contains an illegal action     *         illegal wildcard or actions string contains an illegal action
117     *         (this includes a null actions string)     *         (this includes a null actions string)
# Line 187  public final class PropertyPermission ex Line 188  public final class PropertyPermission ex
188     */     */
189    public boolean implies(Permission p)    public boolean implies(Permission p)
190    {    {
191      if (! (p instanceof PropertyPermission))      // BasicPermission checks for name and type.
192        return false;      if (super.implies(p))
193          {
194      // We have to check the actions.          // We have to check the actions.
195      PropertyPermission pp = (PropertyPermission) p;          PropertyPermission pp = (PropertyPermission) p;
196      if ((pp.actions & ~actions) != 0)          return (pp.actions & ~actions) == 0;
197        return false;        }
198        return false;
     // BasicPermission checks for name.  
     return super.implies(p);  
199    }    }
200    
201    /**    /**
# Line 209  public final class PropertyPermission ex Line 208  public final class PropertyPermission ex
208     */     */
209    public boolean equals(Object obj)    public boolean equals(Object obj)
210    {    {
211      if (! (obj instanceof PropertyPermission))      return super.equals(obj) && actions == ((PropertyPermission) obj).actions;
       return false;  
     PropertyPermission p = (PropertyPermission) obj;  
     return actions == p.actions && super.equals(p);  
212    }    }
213    
214    /**    /**

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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