src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java

Print this page
rev 6663 : imported patch 8008576

@@ -45,10 +45,11 @@
 import java.util.spi.CurrencyNameProvider;
 import java.util.spi.LocaleNameProvider;
 import java.util.spi.LocaleServiceProvider;
 import java.util.spi.TimeZoneNameProvider;
 import sun.util.cldr.CLDRLocaleProviderAdapter;
+import sun.util.spi.CalendarProvider;
 
 /**
  * The LocaleProviderAdapter abstract class.
  *
  * @author Naoto Sato

@@ -293,11 +294,14 @@
         if (langtags.contains(locale.toLanguageTag())) {
             return true;
         }
         if (type == Type.JRE) {
             String oldname = locale.toString().replace('_', '-');
-            return langtags.contains(oldname);
+            return langtags.contains(oldname) ||
+                   "ja-JP-JP".equals(oldname) ||
+                   "th-TH-TH".equals(oldname) ||
+                   "no-NO-NY".equals(oldname);
         }
         return false;
     }
 
     public static Locale[] toLocaleArray(Set<String> tags) {

@@ -420,9 +424,17 @@
      *
      * @return a CalendarNameProvider
      */
     public abstract CalendarNameProvider getCalendarNameProvider();
 
+    /**
+     * Returns a CalendarProvider for this LocaleProviderAdapter, or null if no
+     * CalendarProvider is available.
+     *
+     * @return a CalendarProvider
+     */
+    public abstract CalendarProvider getCalendarProvider();
+
     public abstract LocaleResources getLocaleResources(Locale locale);
 
     public abstract Locale[] getAvailableLocales();
 }