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

Print this page
rev 6352 : imported patch 7162007

@@ -24,11 +24,10 @@
  */
 
 package sun.util.locale.provider;
 
 import java.util.Locale;
-import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.spi.CurrencyNameProvider;
 
 /**
  * Concrete implementation of the

@@ -118,13 +117,8 @@
     private String getString(String key, Locale locale) {
         if (locale == null) {
             throw new NullPointerException();
         }
 
-        ResourceBundle bundle = LocaleProviderAdapter.forType(type).getLocaleData().getCurrencyNames(locale);
-        if (bundle.containsKey(key)) {
-                return bundle.getString(key);
+        return LocaleProviderAdapter.forType(type).getLocaleResources(locale).getCurrencyName(key);
             }
-
-        return null;
-    }
 }