[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: BasicPermission wildcard checking
Kaffe CVS
cvs-commits at kaffe.org
Tue Sep 28 13:32:56 PDT 2004
PatchSet 5228
Date: 2004/09/28 20:29:06
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: BasicPermission wildcard checking
2004-09-28 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/security/BasicPermission.java:
Resynced with GNU Classpath.
2004-09-24 Andrew Haley <aph at redhat.com>
* java/security/BasicPermission.java: Don't check wildcards.
Members:
ChangeLog:1.2782->1.2783
libraries/javalib/java/security/BasicPermission.java:1.4->1.5
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2782 kaffe/ChangeLog:1.2783
--- kaffe/ChangeLog:1.2782 Tue Sep 28 18:37:50 2004
+++ kaffe/ChangeLog Tue Sep 28 20:29:06 2004
@@ -5,7 +5,17 @@
2004-09-28 Dalibor Topic <robilad at kaffe.org>
- * libraries/javalib/java/io/ObjectInputStream.java:
+ * libraries/javalib/java/security/BasicPermission.java:
+ Resynced with GNU Classpath.
+
+ 2004-09-24 Andrew Haley <aph at redhat.com>
+
+ * java/security/BasicPermission.java: Don't check wildcards.
+
+2004-09-28 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/javalib/java/io/ObjectOutputStream.java:
+ libraries/javalib/java/io/ObjectInputStream.java:
Resynced with GNU Classpath.
2004-09-24 Andrew Haley <aph at redhat.com>
Index: kaffe/libraries/javalib/java/security/BasicPermission.java
diff -u kaffe/libraries/javalib/java/security/BasicPermission.java:1.4 kaffe/libraries/javalib/java/security/BasicPermission.java:1.5
--- kaffe/libraries/javalib/java/security/BasicPermission.java:1.4 Tue Sep 21 21:50:28 2004
+++ kaffe/libraries/javalib/java/security/BasicPermission.java Tue Sep 28 20:29:09 2004
@@ -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");
}
More information about the kaffe
mailing list