118 |
*/ |
*/ |
119 |
public void checkPermission(Permission perm) throws AccessControlException |
public void checkPermission(Permission perm) throws AccessControlException |
120 |
{ |
{ |
121 |
|
if (protectionDomains.length == 0) |
122 |
|
throw new AccessControlException ("permission not granted"); |
123 |
for (int i = 0; i < protectionDomains.length; i++) |
for (int i = 0; i < protectionDomains.length; i++) |
124 |
if (!protectionDomains[i].implies(perm)) |
if (!protectionDomains[i].implies(perm)) |
125 |
throw new AccessControlException ("permission not granted"); |
throw new AccessControlException ("permission not granted"); |