private boolean isImplied(Permission perm) {
   for (Permission p : ALLOWED_PERMISSIONS) {
     if (p.implies(perm)) {
       return true;
     }
   }
   return false;
 }
示例#2
0
 /**
  * Check and see if this set of permissions implies the permissions expressed in "permission".
  *
  * @param p the Permission object to compare
  * @return always returns true.
  */
 public boolean implies(Permission permission) {
   return ((permission instanceof RuntimePermission && permission.equals(exitVMPermission))
       ? false
       : all_allowed);
 }
示例#3
0
 public boolean implies(Permission p) {
   if (p instanceof RuntimePermission && p.equals(exitVMPermission)) {
     return false;
   } else return true;
 }