[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/25916] java.text.NumberFormat.getCurrencyInstance throws
From: |
bero at arklinux dot org |
Subject: |
[Bug classpath/25916] java.text.NumberFormat.getCurrencyInstance throws IllegalArgumentExceptions even on standard locales |
Date: |
23 Jan 2006 01:01:33 -0000 |
------- Comment #2 from bero at arklinux dot org 2006-01-23 01:01 -------
Test code based on the java.util.Currency.getInstance() code:
Locale[] allLocales = Locale.getAvailableLocales();
for(int i = 0; i < allLocales.length; i++) {
System.out.print("Locale # " + Integer.toString(i));
Currency test = Currency.getInstance(allLocales[i]);
if (test == null) {
System.out.println("Not supported");
} else {
System.out.println(test.getCurrencyCode());
}
}
shows classpath supports only "USD" and "DEM" while the respective locales code
those as "$" and "DM" (the latter hasn't been in use for ages and should
probably be replaced with EUR, unless this is still needed for some legacy
compatibility); therefore Currency.getInstance() will just throw an
IllegalArgumentException for all locales (at least all locales included in
classpath)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25916