summaryrefslogtreecommitdiffstats
path: root/luni/src
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-09-05 16:39:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-05 16:39:39 +0000
commitd0ce966016703de5783ac5097131d7a738d8b007 (patch)
tree8f3182bf18305dd6708671684fe1af19efdd0f32 /luni/src
parentb2f145710d0a81d37045df0e8bfba2450e9718bd (diff)
parent87e82b7e4d81bfe955a2a2bd4ddf6eb6cc3995e0 (diff)
downloadlibcore-d0ce966016703de5783ac5097131d7a738d8b007.zip
libcore-d0ce966016703de5783ac5097131d7a738d8b007.tar.gz
libcore-d0ce966016703de5783ac5097131d7a738d8b007.tar.bz2
Merge "DecimalFormatSymbols with a null locale should throw." into lmp-dev
Diffstat (limited to 'luni/src')
-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;