8129789: implies() of ServicePermission and DelegationPermission underspecified
authorweijun
Wed, 02 Sep 2015 19:20:46 +0800
changeset 32424 2d9d66d0519f
parent 32423 2342600f2ada
child 32425 b395cd8e4ec5
8129789: implies() of ServicePermission and DelegationPermission underspecified Reviewed-by: mullan
jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/DelegationPermission.java
jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/DelegationPermission.java	Wed Sep 02 03:02:14 2015 +0000
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/DelegationPermission.java	Wed Sep 02 19:20:46 2015 +0800
@@ -132,7 +132,9 @@
      * Checks if this Kerberos delegation permission object "implies" the
      * specified permission.
      * <P>
-     * If none of the above are true, {@code implies} returns false.
+     * This method returns true if this {@code DelegationPermission}
+     * is equal to {@code p}, and returns false otherwise.
+     *
      * @param p the permission to check against.
      *
      * @return true if the specified permission is implied by this object,
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java	Wed Sep 02 03:02:14 2015 +0000
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java	Wed Sep 02 19:20:46 2015 +0800
@@ -179,7 +179,16 @@
      * Checks if this Kerberos service permission object "implies" the
      * specified permission.
      * <P>
-     * If none of the above are true, {@code implies} returns false.
+     * More specifically, this method returns true if all of the following
+     * are true (and returns false if any of them are not):
+     * <ul>
+     * <li> <i>p</i> is an instanceof {@code ServicePermission},
+     * <li> <i>p</i>'s actions are a proper subset of this
+     * {@code ServicePermission}'s actions,
+     * <li> <i>p</i>'s name is equal to this {@code ServicePermission}'s name
+     * or this {@code ServicePermission}'s name is "*".
+     * </ul>
+     *
      * @param p the permission to check against.
      *
      * @return true if the specified permission is implied by this object,