RFA: Currency and DecimalFormatSymbols fix
Mon Apr 2 19:52:00 GMT 2007
This patch allows Currency to handle the special case of erroneous
currency that Sun seems to handle: If the locale does not have an
associated Currency instance, the currency will be set to "XXX". This
case is already handled in GNU Classpath. In essence, this patch is a
merge of the Currency and DecimalFormatSymbols classes.
I have run the testsuite (with make check in libjava/testsuite) and all
tests are passing.
Can someone kindly comment on and/or approve this patch?
2007-04-02 Tania Bento <email@example.com>
* java/text/DecimalFormatSymbols.java: Added the year 2007 to
Copyright information and introduced new variable, currency.
(DecimalFormatSymbols(Locale)): Define currency and
to "XXX", currencySymbol to "?" and localCurrency appropriately.
(getCurrency): Fixed documentation and return the value of
(setCurrency): Fixed documentation and update the value of
(setInternationalCurrencySymbol): Fixed documentation and update
value of currency.
* java/util/Currency.java: Introduced two new variables,
and fractionDigits. In the static block, a properties object is
created and the currency resource is loaded.
(Currency(Locale)): fractionDigits is defined.
(Currency(String)): New method.
(getDefaultFractionDigits): Return the value of fractionDigits.
(getInstance(String)): Check if String is equal to "XXX".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8927 bytes
Desc: not available
More information about the Java-patches