src/share/classes/sun/util/locale/provider/CurrencyNameProviderImpl.java
Print this page
rev 5957 : imported patch 8000245.8000273.8000615
@@ -25,13 +25,13 @@
package sun.util.locale.provider;
import java.util.Locale;
import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import java.util.Set;
import java.util.spi.CurrencyNameProvider;
-import sun.util.resources.OpenListResourceBundle;
/**
* Concrete implementation of the
* {@link java.util.spi.CurrencyNameProvider CurrencyNameProvider} class
* for the JRE LocaleProviderAdapter.
@@ -119,17 +119,13 @@
private String getString(String key, Locale locale) {
if (locale == null) {
throw new NullPointerException();
}
- OpenListResourceBundle bundle = LocaleProviderAdapter.forType(type).getLocaleData().getCurrencyNames(locale);
- LocaleServiceProviderPool pool =
- LocaleServiceProviderPool.getPool(CurrencyNameProvider.class);
+ ResourceBundle bundle = LocaleProviderAdapter.forType(type).getLocaleData().getCurrencyNames(locale);
try {
- if (!pool.hasProviders() ||
- (bundle.getLocale().equals(locale) &&
- bundle.handleGetKeys().contains(key))) {
+ if (bundle.containsKey(key)) {
return bundle.getString(key);
}
} catch (MissingResourceException mre) {}
return null;