summaryrefslogtreecommitdiffstats
path: root/icu/src/main
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-01-13 14:43:53 -0800
committerElliott Hughes <enh@google.com>2010-01-13 14:43:53 -0800
commitaba52f92911e0faa4ae1907becc5a66cdb3254de (patch)
tree5f5b5179738111629a79bb6dc49d071fb08a685a /icu/src/main
parentddebec1e111be2ba03da2debea29546ebe4eb6e1 (diff)
downloadlibcore-aba52f92911e0faa4ae1907becc5a66cdb3254de.zip
libcore-aba52f92911e0faa4ae1907becc5a66cdb3254de.tar.gz
libcore-aba52f92911e0faa4ae1907becc5a66cdb3254de.tar.bz2
Remove the last bits of the ICU ResourceBundle hack.
This patch switches us over to calling ICU directly for localized currency symbols, and then removes all the mechanism for sneaking fake ResourceBundle implementations in. The code's a lot simpler too, because ICU's default behavior is what we want anyway.
Diffstat (limited to 'icu/src/main')
-rw-r--r--icu/src/main/java/com/ibm/icu4jni/util/Resources.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/icu/src/main/java/com/ibm/icu4jni/util/Resources.java b/icu/src/main/java/com/ibm/icu4jni/util/Resources.java
index efc55d1..f1c50e3 100644
--- a/icu/src/main/java/com/ibm/icu4jni/util/Resources.java
+++ b/icu/src/main/java/com/ibm/icu4jni/util/Resources.java
@@ -91,17 +91,6 @@ public class Resources {
return result;
}
- // TODO: fix remaining caller and remove this.
- public static ResourceBundle getInstance(String bundleName, String locale) {
- if (locale == null) {
- locale = Locale.getDefault().toString();
- }
- if (bundleName.startsWith("Currency")) {
- return new CurrencyResourceBundle(locale);
- }
- throw new AssertionError("bundle="+bundleName+" locale="+locale);
- }
-
/**
* Returns an array of ISO language names (two-letter codes), fetched either
* from ICU's database or from our memory cache.
@@ -275,36 +264,6 @@ public class Resources {
return result;
}
- // --- Specialized ResourceBundle subclasses ------------------------------
-
- /**
- * Internal ResourceBundle mimicking the Harmony "Currency_*" bundles. Keys
- * are the three-letter ISO currency codes. Values are the printable
- * currency names in terms of the specified locale. An example entry is
- * "USD"->"$" (for inside the US) and "USD->"US$" (for outside the US).
- */
- private static final class CurrencyResourceBundle extends ResourceBundle {
-
- private String locale;
-
- public CurrencyResourceBundle(String locale) {
- super();
- this.locale = locale;
- }
-
- @Override
- public Enumeration<String> getKeys() {
- // Won't get used
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected Object handleGetObject(String key) {
- return getCurrencySymbolNative(locale, key);
- }
-
- }
-
// --- Native methods accessing ICU's database ----------------------------
public static native String getDisplayCountryNative(String countryCode, String locale);