mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 03:18:57 +08:00
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:
parent
a31b081d11
commit
2b607265f5
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user