summaryrefslogtreecommitdiffstats
path: root/harmony-tests/src
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-06-25 16:18:38 +0100
committerNarayan Kamath <narayan@google.com>2014-07-23 10:28:42 +0100
commit5c0472fd7c53464e526bb833707551d85dbafec1 (patch)
treec9812c0de3b2c46f4059e07f3179c48df79227ce /harmony-tests/src
parent1debf79647da22cf39dd5b4d0db2e008026fbc60 (diff)
downloadlibcore-5c0472fd7c53464e526bb833707551d85dbafec1.zip
libcore-5c0472fd7c53464e526bb833707551d85dbafec1.tar.gz
libcore-5c0472fd7c53464e526bb833707551d85dbafec1.tar.bz2
Fix handling of invalid locales in Date/DecimalFormatSymbols.
For locales whose language code is "und" we use Locale.ROOT instead. This also fixes two other corner cases : - We were using the wrong locale to fetch timezone strings when the input locale was null. we now use the same locale throughout by making sure we don't perform any subsititutions in LocaleData.get. - Adds a clearer comment about the broken serialization behaviour. bug: 15849709 Change-Id: I95e7eb0ccb7458711038ce9b1c76b3279acda9d6
Diffstat (limited to 'harmony-tests/src')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/text/DateFormatSymbolsTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/DateFormatSymbolsTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
index 9fe3681..70e41a2 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
@@ -88,7 +88,7 @@ public class DateFormatSymbolsTest extends junit.framework.TestCase {
Locale locale = new Locale("not exist language", "not exist country");
DateFormatSymbols symbols = DateFormatSymbols.getInstance(locale);
- assertNotNull(symbols);
+ assertEquals(DateFormatSymbols.getInstance(Locale.ROOT), symbols);
}
/**