ResourceBundle.java (getBundle): Throw NullPointerException if baseName is null.
* java/util/ResourceBundle.java (getBundle): Throw NullPointerException if baseName is null. From-SVN: r27126
This commit is contained in:
parent
ae188a870e
commit
a81eb01077
2 changed files with 9 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue