diff options
author | Tom Tromey <tromey@cygnus.com> | 1999-05-24 15:00:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1999-05-24 15:00:02 +0000 |
commit | a81eb0107790afbf403b3b2721be21864f11c65e (patch) | |
tree | 7aef594ba92fef1de6a2419091cfe930b132cf5b /libjava | |
parent | ae188a870e40bdf711b0dc0bcaf9fa28d1d5b6f0 (diff) | |
download | gcc-a81eb0107790afbf403b3b2721be21864f11c65e.zip gcc-a81eb0107790afbf403b3b2721be21864f11c65e.tar.gz gcc-a81eb0107790afbf403b3b2721be21864f11c65e.tar.bz2 |
ResourceBundle.java (getBundle): Throw NullPointerException if baseName is null.
* java/util/ResourceBundle.java (getBundle): Throw
NullPointerException if baseName is null.
From-SVN: r27126
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/util/ResourceBundle.java | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 791fa6f..576f7d3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +1999-05-24 Tom Tromey <tromey@cygnus.com> + + * java/util/ResourceBundle.java (getBundle): Throw + NullPointerException if baseName is null. + 1999-05-22 Tom Tromey <tromey@cygnus.com> * java/util/zip/ZipInputStream.java (fill): New method. diff --git a/libjava/java/util/ResourceBundle.java b/libjava/java/util/ResourceBundle.java index 2a11083..5a2002a 100644 --- a/libjava/java/util/ResourceBundle.java +++ b/libjava/java/util/ResourceBundle.java @@ -156,6 +156,9 @@ public abstract class ResourceBundle ResourceBundle rb; Class rbc; + if (baseName == null) + throw new NullPointerException (); + rb = partialGetBundle(baseName, locale, false); if (rb != null) return rb; @@ -167,7 +170,7 @@ public abstract class ResourceBundle if (rb != null) return rb; } - + throw new MissingResourceException("can't load bundle", baseName, "bundle"); |