8170900: Issue with FilePermission::implies for wildcard flag(-)
Reviewed-by: rriggs, xuelei
--- 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.
*