summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-09-05 10:57:26 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-05 10:57:26 +0000
commitc9a79e62ee08665ce46fb08c8d1f659d4e78c058 (patch)
tree5f8f486abb7ff39cbf43b3e74f06a998af291b93 /luni
parentaeecf3ecfd7b6619db531e8febb4d58bbbc0f992 (diff)
parentfba9a7e32be3a80df36fe7b3f6ee839b68f35d2e (diff)
downloadlibcore-c9a79e62ee08665ce46fb08c8d1f659d4e78c058.zip
libcore-c9a79e62ee08665ce46fb08c8d1f659d4e78c058.tar.gz
libcore-c9a79e62ee08665ce46fb08c8d1f659d4e78c058.tar.bz2
Merge "DecimalFormatSymbols with a null locale should throw."
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/java/java/text/DecimalFormatSymbols.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/luni/src/main/java/java/text/DecimalFormatSymbols.java b/luni/src/main/java/java/text/DecimalFormatSymbols.java
index 6e25c1b..fba2d6e 100644
--- a/luni/src/main/java/java/text/DecimalFormatSymbols.java
+++ b/luni/src/main/java/java/text/DecimalFormatSymbols.java
@@ -81,6 +81,10 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
* the locale.
*/
public DecimalFormatSymbols(Locale locale) {
+ if (locale == null) {
+ throw new NullPointerException("locale == null");
+ }
+
locale = LocaleData.mapInvalidAndNullLocales(locale);
LocaleData localeData = LocaleData.get(locale);
this.zeroDigit = localeData.zeroDigit;