diff options
Diffstat (limited to 'libjava/java/security/Permissions.java')
-rw-r--r-- | libjava/java/security/Permissions.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libjava/java/security/Permissions.java b/libjava/java/security/Permissions.java index d44341c947a..ce63cc2cca2 100644 --- a/libjava/java/security/Permissions.java +++ b/libjava/java/security/Permissions.java @@ -228,9 +228,18 @@ class PermissionsHash extends PermissionCollection * @param perm the permission to check * @return true if it is implied */ + // FIXME: Should this method be synchronized? public boolean implies(Permission perm) { - return perms.get(perm) != null; + Enumeration elements = elements(); + + while (elements.hasMoreElements()) + { + Permission p = (Permission)elements.nextElement(); + if (p.implies(perm)) + return true; + } + return false; } /** |