src/share/classes/java/security/AllPermission.java

Print this page

        

*** 60,72 **** private static final long serialVersionUID = -2916474571451318075L; /** * Creates a new AllPermission object. */ ! ! public AllPermission() ! { super("<all permissions>"); } /** --- 60,70 ---- private static final long serialVersionUID = -2916474571451318075L; /** * Creates a new AllPermission object. */ ! public AllPermission() { super("<all permissions>"); } /**
*** 75,86 **** * to instantiate new Permission objects. * * @param name ignored * @param actions ignored. */ ! public AllPermission(String name, String actions) ! { this(); } /** * Checks if the specified permission is "implied" by --- 73,83 ---- * to instantiate new Permission objects. * * @param name ignored * @param actions ignored. */ ! public AllPermission(String name, String actions) { this(); } /** * Checks if the specified permission is "implied" by
*** 118,129 **** /** * Returns the canonical string representation of the actions. * * @return the actions. */ ! public String getActions() ! { return "<all actions>"; } /** * Returns a new PermissionCollection object for storing AllPermission --- 115,125 ---- /** * Returns the canonical string representation of the actions. * * @return the actions. */ ! public String getActions() { return "<all actions>"; } /** * Returns a new PermissionCollection object for storing AllPermission
*** 131,141 **** * <p> * * @return a new PermissionCollection object suitable for * storing AllPermissions. */ - public PermissionCollection newPermissionCollection() { return new AllPermissionCollection(); } } --- 127,136 ----
*** 155,166 **** * * @serial include */ final class AllPermissionCollection ! extends PermissionCollection ! implements java.io.Serializable { // use serialVersionUID from JDK 1.2.2 for interoperability private static final long serialVersionUID = -4023755556366636806L; --- 150,161 ---- * * @serial include */ final class AllPermissionCollection ! extends PermissionCollection ! implements java.io.Serializable { // use serialVersionUID from JDK 1.2.2 for interoperability private static final long serialVersionUID = -4023755556366636806L;
*** 186,197 **** * * @exception SecurityException - if this AllPermissionCollection object * has been marked readonly */ ! public void add(Permission permission) ! { if (! (permission instanceof AllPermission)) throw new IllegalArgumentException("invalid permission: "+ permission); if (isReadOnly()) throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection"); --- 181,191 ---- * * @exception SecurityException - if this AllPermissionCollection object * has been marked readonly */ ! public void add(Permission permission) { if (! (permission instanceof AllPermission)) throw new IllegalArgumentException("invalid permission: "+ permission); if (isReadOnly()) throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection");
*** 201,228 **** /** * 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 all_allowed; // No sync; staleness OK } /** * Returns an enumeration of all the AllPermission objects in the * container. * * @return an enumeration of all the AllPermission objects. */ ! public Enumeration<Permission> elements() ! { return new Enumeration<Permission>() { private boolean hasMore = all_allowed; public boolean hasMoreElements() { return hasMore; --- 195,220 ---- /** * Check and see if this set of permissions implies the permissions * expressed in "permission". * ! * @param permission the Permission object to compare * * @return always returns true. */ ! public boolean implies(Permission permission) { return all_allowed; // No sync; staleness OK } /** * Returns an enumeration of all the AllPermission objects in the * container. * * @return an enumeration of all the AllPermission objects. */ ! public Enumeration<Permission> elements() { return new Enumeration<Permission>() { private boolean hasMore = all_allowed; public boolean hasMoreElements() { return hasMore;