RFA: Currency and DecimalFormatSymbols fix
Tania Bento
tbento@redhat.com
Mon Apr 2 19:52:00 GMT 2007
Hey,
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?
Thanks,
Tania
2007-04-02 Tania Bento <tbento@redhat.com>
* java/text/DecimalFormatSymbols.java: Added the year 2007 to
Copyright information and introduced new variable, currency.
(DecimalFormatSymbols(Locale)): Define currency and
intlCurrencySymbol
to "XXX", currencySymbol to "?" and localCurrency appropriately.
(getCurrency): Fixed documentation and return the value of
currency.
(setCurrency): Fixed documentation and update the value of
currency.
(setInternationalCurrencySymbol): Fixed documentation and update
the
value of currency.
* java/util/Currency.java: Introduced two new variables,
properties
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...
Name: patch.diff
Type: text/x-patch
Size: 8927 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20070402/517ff263/attachment.bin>
More information about the Java-patches
mailing list