This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] java.security.Permission
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Cc: Jerry Quinn <jlquinn at optonline dot net>
- Date: Mon, 7 Jun 2004 08:25:34 +0200
- Subject: Re: [patch] java.security.Permission
- References: <E1BXCdT-00064i-00@localhost>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Montag, 7. Juni 2004 07:25 schrieb Jerry Quinn:
> This fixes a java.io.FilePermission.simple failure in mauve. I
> don't know if it's right, but it seems reasonable.
>
> 2004-06-07 Jerry Quinn <jlquinn@optonline.net>
>
> * java/security/Permission.java (Permission): Reject null
> name.
No, its not correct. Neither SUN's API documentation says this nor a
quick test proves your assumption (testcase attached). It gives no
NullPointerException with SUN's JDK 1.4.2.
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAxAphWSOgCCdjSDsRAo1VAJ4nkjVAAogNib3GAa9C+fRObeKaLACgkC3i
bXv4mYJ2yQWd7ef47JeBk7g=
=zigG
-----END PGP SIGNATURE-----
import java.security.Permission;
public class PermissionTest extends Permission
{
public PermissionTest()
{
super(null);
}
public boolean equals(Object obj)
{
return true;
}
public int hashCode()
{
return 1;
}
public boolean implies(Permission perm)
{
return false;
}
public String getActions()
{
return null;
}
public static final void main(String[] args)
{
PermissionTest test = new PermissionTest();
}
}