8170900: Issue with FilePermission::implies for wildcard flag(-)
authorweijun
Thu, 05 Jan 2017 22:58:54 +0800
changeset 42999 110c2df82517
parent 42998 1a5bb301d855
child 43000 fa648bd4286b
8170900: Issue with FilePermission::implies for wildcard flag(-) Reviewed-by: rriggs, xuelei
jdk/src/java.base/share/classes/java/io/FilePermission.java
--- a/jdk/src/java.base/share/classes/java/io/FilePermission.java	Thu Jan 05 22:37:52 2017 +0800
+++ b/jdk/src/java.base/share/classes/java/io/FilePermission.java	Thu Jan 05 22:58:54 2017 +0800
@@ -532,11 +532,13 @@
      * simple {@code npath} is inside a wildcard {@code npath} if and only if
      * {@code  simple_npath.relativize(wildcard_npath)} is exactly "..",
      * a simple {@code npath} is recursively inside a wildcard {@code npath}
-     * if and only if {@code simple_npath.relativize(wildcard_npath)}
-     * is a series of one or more "..". An invalid {@code FilePermission} does
-     * not imply any object except for itself. An invalid {@code FilePermission}
-     * is not implied by any object except for itself or a {@code FilePermission}
-     * on {@literal "<<ALL FILES>>"} whose actions is a superset of this
+     * if and only if {@code simple_npath.relativize(wildcard_npath)} is a
+     * series of one or more "..". This means "/-" implies "/foo" but not "foo".
+     * <p>
+     * An invalid {@code FilePermission} does not imply any object except for
+     * itself. An invalid {@code FilePermission} is not implied by any object
+     * except for itself or a {@code FilePermission} on
+     * {@literal "<<ALL FILES>>"} whose actions is a superset of this
      * invalid {@code FilePermission}. Even if two {@code FilePermission}
      * are created with the same invalid path, one does not imply the other.
      *