diff options
author | Mark Wielaard <mark@klomp.org> | 2006-03-17 10:55:27 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-03-17 10:55:27 +0000 |
commit | 6c99d6627576eafb4301a1f3822afa2840c67369 (patch) | |
tree | dec4412481714aa22b975e9d820aa4518c608b27 /java/security | |
parent | f09dee0c326e6d7cd81872d0bc25f45f3ae2e19d (diff) | |
download | classpath-6c99d6627576eafb4301a1f3822afa2840c67369.tar.gz |
* java/security/BasicPermission.java (BasicPermission): Check
name equals empty string to force NullPointerException.
Diffstat (limited to 'java/security')
-rw-r--r-- | java/security/BasicPermission.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/security/BasicPermission.java b/java/security/BasicPermission.java index 267a6e292..ef2cc4df0 100644 --- a/java/security/BasicPermission.java +++ b/java/security/BasicPermission.java @@ -1,5 +1,6 @@ /* BasicPermission.java -- implements a simple named permission - Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -97,7 +98,7 @@ public abstract class BasicPermission extends java.security.Permission // requirement exists in the specification and Sun's runtime // doesn't appear to do it. - if ("".equals(name)) + if (name.equals("")) throw new IllegalArgumentException("Empty name"); } |