aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/security/Permissions.java
diff options
context:
space:
mode:
authorDalibor Topic <robilad@kaffe.org>2005-02-20 21:18:30 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2005-02-20 21:18:30 +0000
commit7d651220a36ec97dfbff7e6bd23fe6147956f078 (patch)
tree60fdf53adbc4000a2ef51e30a5f32ac9d42b11bf /libjava/java/security/Permissions.java
parent237eaf79a5cb53340d8451e3379d6c483ec4f1aa (diff)
downloadgcc-7d651220a36ec97dfbff7e6bd23fe6147956f078.zip
gcc-7d651220a36ec97dfbff7e6bd23fe6147956f078.tar.gz
gcc-7d651220a36ec97dfbff7e6bd23fe6147956f078.tar.bz2
RE.java, [...]: Made 'inner' classes real public static inner classes...
2005-02-20 Dalibor Topic <robilad@kaffe.org> * libraries/javalib/gnu/regexp/RE.java, libraries/javalib/java/io/ObjectInputStream.java, libraries/javalib/java/security/AllPermission.java, libraries/javalib/java/security/BasicPermission.java, libraries/javalib/java/security/Permissions.java, libraries/javalib/java/text/MessageFormat.java: Made 'inner' classes real public static inner classes, and made them final where possible, or removed them where unused. From-SVN: r95310
Diffstat (limited to 'libjava/java/security/Permissions.java')
-rw-r--r--libjava/java/security/Permissions.java116
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