src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
Print this page
*** 176,186 ****
/**
* Returns the hash code value for this object.
*
* @return a hash code value for this object.
*/
-
public int hashCode() {
return getName().hashCode();
}
--- 176,185 ----
*** 276,291 ****
/**
* Check and see if this collection of permissions implies the permissions
* expressed in "permission".
*
! * @param p 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) {
--- 275,289 ----
/**
* Check and see if this collection of permissions implies the permissions
* expressed in "permission".
*
! * @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,318 ****
* 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())
--- 306,315 ----
*** 327,337 ****
* 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);
}
--- 324,333 ----
*** 374,385 ****
/*
* Reads in a Vector of DelegationPermissions and saves them in the perms field.
*/
@SuppressWarnings("unchecked")
! private void readObject(ObjectInputStream in) throws IOException,
! ClassNotFoundException {
// Don't call defaultReadObject()
// Read in serialized fields
ObjectInputStream.GetField gfields = in.readFields();
--- 370,382 ----
/*
* Reads in a Vector of DelegationPermissions and saves them in the perms field.
*/
@SuppressWarnings("unchecked")
! private void readObject(ObjectInputStream in)
! throws IOException, ClassNotFoundException
! {
// Don't call defaultReadObject()
// Read in serialized fields
ObjectInputStream.GetField gfields = in.readFields();