diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2005-06-30 18:05:34 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2005-06-30 18:05:34 +0000 |
commit | 2938ef77ad562b7a087a087a880b956f2f1c2d5d (patch) | |
tree | 3145fa5fd74972ac441bcd2eaed5c87054c8d6ef | |
parent | 5cd3554bc8a516db8c7141eedf3c33bf486068a7 (diff) | |
download | classpath-2938ef77ad562b7a087a087a880b956f2f1c2d5d.tar.gz |
2005-06-30 Andrew John Hughes <gnu_andrew@member.fsf.org>
* gnu/java/locale/LocaleHelper.java:
Fixed to use new property files.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gnu/java/locale/LocaleHelper.java | 25 |
2 files changed, 16 insertions, 14 deletions
@@ -1,3 +1,8 @@ +2005-06-30 Andrew John Hughes <gnu_andrew@member.fsf.org> + + * gnu/java/locale/LocaleHelper.java: + Fixed to use new property files. + 2005-06-30 Keith Seitz <keiths@redhat.com> * gnu/classpath/jdwp/transport/JdwpConnection.java (sendEvent): New diff --git a/gnu/java/locale/LocaleHelper.java b/gnu/java/locale/LocaleHelper.java index 0bf77a6c6..032e3da94 100644 --- a/gnu/java/locale/LocaleHelper.java +++ b/gnu/java/locale/LocaleHelper.java @@ -38,7 +38,6 @@ exception statement from your version. */ package gnu.java.locale; -import java.util.Hashtable; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -87,17 +86,17 @@ public class LocaleHelper boolean checkRoot) { String localizedString; - Hashtable table; + String property; if (key.equals("")) return ""; + property = name + "." + key; /* Localize to inLocale */ try { - table = (Hashtable) + localizedString = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", - inLocale).getObject(name); - localizedString = (String) table.get(key); + inLocale).getString(property); } catch (MissingResourceException exception) { @@ -110,10 +109,9 @@ public class LocaleHelper { ResourceBundle bundle; - bundle = + bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation"); - table = (Hashtable) bundle.getObject(name); - localizedString = (String) table.get(key); + localizedString = bundle.getString(property); } catch (MissingResourceException exception) { @@ -125,10 +123,9 @@ public class LocaleHelper { try { - table = (Hashtable) + localizedString = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", - Locale.ENGLISH).getObject(name); - localizedString= (String) table.get(key); + Locale.ENGLISH).getString(property); } catch (MissingResourceException exception) { @@ -140,10 +137,10 @@ public class LocaleHelper { try { - table = (Hashtable) + localizedString = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", - new Locale("","","")).getObject(name); - localizedString= (String) table.get(key); + new Locale("","","") + ).getString(property); } catch (MissingResourceException exception) { |