This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] java.security.Permission


-----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();
  }
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]