src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
Print this page
@@ -176,11 +176,10 @@
/**
* Returns the hash code value for this object.
*
* @return a hash code value for this object.
*/
-
public int hashCode() {
return getName().hashCode();
}
@@ -276,16 +275,15 @@
/**
* Check and see if this collection of permissions implies the permissions
* expressed in "permission".
*
- * @param p the Permission object to compare
+ * @param permission the Permission object to compare
*
* @return true if "permission" is a proper subset of a permission in
* the collection, false if not.
*/
-
public boolean implies(Permission permission) {
if (! (permission instanceof DelegationPermission))
return false;
synchronized (this) {
@@ -308,11 +306,10 @@
* DelegationPermission
*
* @exception SecurityException - if this PermissionCollection object
* has been marked readonly
*/
-
public void add(Permission permission) {
if (! (permission instanceof DelegationPermission))
throw new IllegalArgumentException("invalid permission: "+
permission);
if (isReadOnly())
@@ -327,11 +324,10 @@
* Returns an enumeration of all the DelegationPermission objects
* in the container.
*
* @return an enumeration of all the DelegationPermission objects.
*/
-
public Enumeration<Permission> elements() {
// Convert Iterator into Enumeration
synchronized (this) {
return Collections.enumeration(perms);
}
@@ -374,12 +370,13 @@
/*
* Reads in a Vector of DelegationPermissions and saves them in the perms field.
*/
@SuppressWarnings("unchecked")
- private void readObject(ObjectInputStream in) throws IOException,
- ClassNotFoundException {
+ private void readObject(ObjectInputStream in)
+ throws IOException, ClassNotFoundException
+ {
// Don't call defaultReadObject()
// Read in serialized fields
ObjectInputStream.GetField gfields = in.readFields();