ResourceBundle.java (partialGetBundle): Explicitly use locale.toString().

* java/util/ResourceBundle.java (partialGetBundle): Explicitly use
	locale.toString().
	(getBundle): Don't explicitly throw null pointer exception.

From-SVN: r26856
This commit is contained in:
Tom Tromey 1999-05-10 08:58:54 +00:00 committed by Tom Tromey
parent a31b081d11
commit 2b607265f5
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,9 @@
1999-05-10 Tom Tromey <tromey@cygnus.com>
* java/util/ResourceBundle.java (partialGetBundle): Explicitly use
locale.toString().
(getBundle): Don't explicitly throw null pointer exception.
* gnu/gcj/RawData.java: Added copyright header.
* include/jni.h (_Jv_va_list): Always define as va_list.

View File

@ -129,7 +129,9 @@ public abstract class ResourceBundle
{
ResourceBundle rb;
String bundleName = baseName + "_" + locale;
// Explicitly invoke locale.toString() to force a
// NullPointerException when required.
String bundleName = baseName + "_" + locale.toString();
// Check the cache.
Object obj = resource_cache.get(bundleName);
@ -154,11 +156,6 @@ public abstract class ResourceBundle
ResourceBundle rb;
Class rbc;
// FIXME: We can't currently rely on NullPointerException being
// thrown when we invoke a method on a null object.
if (locale == null)
throw new NullPointerException ();
rb = partialGetBundle(baseName, locale, false);
if (rb != null)
return rb;