]> granicus.if.org Git - icu/commitdiff
ICU-13368 Fixing serialization test failure caused by r40561.
authorShane Carr <shane@unicode.org>
Thu, 5 Oct 2017 22:32:41 +0000 (22:32 +0000)
committerShane Carr <shane@unicode.org>
Thu, 5 Oct 2017 22:32:41 +0000 (22:32 +0000)
X-SVN-Rev: 40574

icu4j/main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java

index e69f2a6052f976b38141ff4efc1fb919aa1dd318..b0fe8de769455146d182af96d0ffc8bfd1843f89 100644 (file)
@@ -33,6 +33,8 @@ public class ICUCurrencyDisplayInfoProvider implements CurrencyDisplayInfoProvid
 
     @Override
     public CurrencyDisplayInfo getInstance(ULocale locale, boolean withFallback) {
+        // Make sure the locale is non-null (this can happen during deserialization):
+        if (locale == null) { locale = ULocale.ROOT; }
         ICUCurrencyDisplayInfo instance = currencyDisplayInfoCache;
         if (instance == null || !instance.locale.equals(locale) || instance.fallback != withFallback) {
             ICUResourceBundle rb;