[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/31896] New: Currency.getInstance(String currencyCode) fai
From: |
colin dot green at focus-solutions dot co dot uk |
Subject: |
[Bug classpath/31896] New: Currency.getInstance(String currencyCode) fails. |
Date: |
10 May 2007 13:48:08 -0000 |
E.g.
-------------------
Currency cur = Currency.getInstance("BSD") // Bahamas Dollars.
-------------------
getInstance() appears to be looping over all available locales looking for a
locale where the specified currency code is the default currency. If found then
that Currency object is returned, otherwise an exception is thrown.
In contrast to this, the Sun JDK appears to always return a Currency object. If
a relevant currency symbol isn't defined by the locale in use then a fall-back
of using the currency code as the symbol is used. So, for example currencies in
Bahamas dollars are formatted as "BSD1,234.56".
As it stands there is no way of using a large number of currencies within
Classpath. BSD just happens to be the one I was trying to use.
--
Summary: Currency.getInstance(String currencyCode) fails.
Product: classpath
Version: 0.95
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: colin dot green at focus-solutions dot co dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31896
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/31896] New: Currency.getInstance(String currencyCode) fails.,
colin dot green at focus-solutions dot co dot uk <=