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

Diff of /classpath/java/security/AccessControlContext.java

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

revision 1.12 by rsdio, Mon Sep 26 01:06:46 2005 UTC revision 1.13 by glavaux, Sun Oct 23 17:04:46 2005 UTC
# Line 128  public final class AccessControlContext Line 128  public final class AccessControlContext
128    public void checkPermission(Permission perm) throws AccessControlException    public void checkPermission(Permission perm) throws AccessControlException
129    {    {
130      if (protectionDomains.length == 0)      if (protectionDomains.length == 0)
131        throw new AccessControlException ("permission not granted");        throw new AccessControlException ("permission "
132                                            + perm
133                                            + " not granted: no protection domains");
134    
135      for (int i = 0; i < protectionDomains.length; i++)      for (int i = 0; i < protectionDomains.length; i++)
136        if (!protectionDomains[i].implies(perm))        {
137          throw new AccessControlException ("permission not granted");          final ProtectionDomain domain = protectionDomains[i];
138            if (!domain.implies(perm))
139              throw new AccessControlException ("permission "
140                                                + perm
141                                                + " not granted: "
142                                                + domain
143                                                + " does not imply it.");
144          }
145    }    }
146    
147    /**    /**

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

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