src/share/classes/javax/crypto/CryptoAllPermission.java
Print this page
*** 134,145 ****
* @param permission the Permission object to add.
*
* @exception SecurityException - if this CryptoAllPermissionCollection
* object has been marked readonly
*/
! public void add(Permission permission)
! {
if (isReadOnly())
throw new SecurityException("attempt to add a Permission to " +
"a readonly PermissionCollection");
if (permission != CryptoAllPermission.INSTANCE)
--- 134,144 ----
* @param permission the Permission object to add.
*
* @exception SecurityException - if this CryptoAllPermissionCollection
* object has been marked readonly
*/
! public void add(Permission permission) {
if (isReadOnly())
throw new SecurityException("attempt to add a Permission to " +
"a readonly PermissionCollection");
if (permission != CryptoAllPermission.INSTANCE)
*** 150,166 ****
/**
* Check and see if this set of permissions implies the permissions
* expressed in "permission".
*
! * @param p the Permission object to compare
*
* @return true if the given permission is implied by this
* CryptoAllPermissionCollection.
*/
! public boolean implies(Permission permission)
! {
if (!(permission instanceof CryptoPermission)) {
return false;
}
return all_allowed;
}
--- 149,164 ----
/**
* Check and see if this set of permissions implies the permissions
* expressed in "permission".
*
! * @param permission the Permission object to compare
*
* @return true if the given permission is implied by this
* CryptoAllPermissionCollection.
*/
! public boolean implies(Permission permission) {
if (!(permission instanceof CryptoPermission)) {
return false;
}
return all_allowed;
}