diff options
Diffstat (limited to 'libjava/java/security/Permissions.java')
-rw-r--r-- | libjava/java/security/Permissions.java | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/libjava/java/security/Permissions.java b/libjava/java/security/Permissions.java index 4d7c0f7..b603ded 100644 --- a/libjava/java/security/Permissions.java +++ b/libjava/java/security/Permissions.java @@ -188,67 +188,67 @@ public final class Permissions extends PermissionCollection } }; } -} // class Permissions - -/** - * Implements the permission collection for all permissions without one of - * their own, and obeys serialization of JDK. - * - * @author Eric Blake <ebb9@email.byu.edu> - */ -class PermissionsHash extends PermissionCollection -{ - /** - * Compatible with JDK 1.1+. - */ - private static final long serialVersionUID = -8491988220802933440L; /** - * Hashtable where we store permissions. + * Implements the permission collection for all permissions without one of + * their own, and obeys serialization of JDK. * - * @serial the stored permissions, both as key and value + * @author Eric Blake (ebb9@email.byu.edu) */ - private final Hashtable perms = new Hashtable(); - - /** - * Add a permission. We don't need to check for read-only, as this - * collection is never exposed outside of Permissions, which has already - * done that check. - * - * @param perm the permission to add - */ - public void add(Permission perm) + private static final class PermissionsHash extends PermissionCollection { - perms.put(perm, perm); - } - - /** - * Returns true if perm is in the collection. - * - * @param perm the permission to check - * @return true if it is implied - */ - // FIXME: Should this method be synchronized? - public boolean implies(Permission perm) - { - Enumeration elements = elements(); - - while (elements.hasMoreElements()) - { - Permission p = (Permission)elements.nextElement(); - if (p.implies(perm)) - return true; - } - return false; - } - - /** - * Return the elements. - * - * @return the elements - */ - public Enumeration elements() - { - return perms.elements(); - } + /** + * Compatible with JDK 1.1+. + */ + private static final long serialVersionUID = -8491988220802933440L; + + /** + * Hashtable where we store permissions. + * + * @serial the stored permissions, both as key and value + */ + private final Hashtable perms = new Hashtable(); + + /** + * Add a permission. We don't need to check for read-only, as this + * collection is never exposed outside of Permissions, which has already + * done that check. + * + * @param perm the permission to add + */ + public void add(Permission perm) + { + perms.put(perm, perm); + } + + /** + * Returns true if perm is in the collection. + * + * @param perm the permission to check + * @return true if it is implied + */ + // FIXME: Should this method be synchronized? + public boolean implies(Permission perm) + { + Enumeration elements = elements(); + + while (elements.hasMoreElements()) + { + Permission p = (Permission)elements.nextElement(); + if (p.implies(perm)) + return true; + } + return false; + } + + /** + * Return the elements. + * + * @return the elements + */ + public Enumeration elements() + { + return perms.elements(); + } + } // class PermissionsHash } // class Permissions |