Index: java/security/BasicPermission.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/security/BasicPermission.java,v retrieving revision 1.10 diff -u -r1.10 BasicPermission.java --- java/security/BasicPermission.java 18 Jul 2003 16:54:56 -0000 1.10 +++ java/security/BasicPermission.java 24 Sep 2004 13:33:29 -0000 @@ -81,9 +81,8 @@ 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 @@ -92,12 +91,11 @@ 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"); }