diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-05 17:51:11 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-05 17:51:11 +0000 |
commit | 0d900c560114fed85f93444009fafbddbed1d60d (patch) | |
tree | e02eeb56867f7af330cef0bdcf9e5b844f6976e2 | |
parent | b9d8c39b4ba9d62d473178be9ab0ed9915e6839b (diff) | |
download | gcc-0d900c560114fed85f93444009fafbddbed1d60d.tar.gz |
2004-08-04 Andrew Haley <aph@redhat.com>
* java/security/BasicPermission.java: Don't check wildcards.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85608 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/java/security/BasicPermission.java | 16 |
2 files changed, 11 insertions, 9 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1c250b5a7a4..575c59188e9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2004-08-04 Andrew Haley <aph@redhat.com> + + * java/security/BasicPermission.java: Don't check wildcards. + 2004-08-04 Thomas Fitzsimmons <fitzsim@redhat.com> Michael Koch <konqueror@gmx.de> diff --git a/libjava/java/security/BasicPermission.java b/libjava/java/security/BasicPermission.java index 0945f2d7faf..7b98563518e 100644 --- a/libjava/java/security/BasicPermission.java +++ b/libjava/java/security/BasicPermission.java @@ -80,9 +80,8 @@ public abstract class BasicPermission extends Permission private static final long serialVersionUID = 6279438298436773498L; /** - * Create a new instance with the specified permission name. If the name - * is empty, or contains an illegal wildcard character, an exception is - * thrown. + * Create a new instance with the specified permission name. If the + * name is empty an exception is thrown. * * @param name the name of this permission * @throws NullPointerException if name is null @@ -91,12 +90,11 @@ public abstract class BasicPermission extends Permission public BasicPermission(String name) { super(name); - if (name.indexOf("*") != -1) - { - if ((! name.endsWith(".*") && ! name.equals("*")) - || name.indexOf("*") != name.lastIndexOf("*")) - throw new IllegalArgumentException("Bad wildcard: " + name); - } + + // This routine used to check for illegal wildcards, but no such + // requirement exists in the specification and Sun's runtime + // doesn't appear to do it. + if ("".equals(name)) throw new IllegalArgumentException("Empty name"); } |