classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Re: java.util.Currency


From: Michael Koch
Subject: Re: [cp-patches] Re: java.util.Currency
Date: Wed, 17 Nov 2004 08:19:05 +0100
User-agent: KMail/1.6.2

Am Mittwoch, 17. November 2004 02:50 schrieb Bryce McKinlay:
> Hi Andrew,
>
> A while back I was hacking on java.util.Currency and decided to
> change our strategy a little. Rather than get the currency data
> from the Locales, I've put a separate table containing the data for
> each currency into the Currency class itself. This seems to be the
> logical thing to do since there isn't a 1:1 correspondence between
> a locale and a currency anyway. This should improve getInstance()
> performance a lot since we no longer need to go fishing through all
> locales to find a given currency code, as well as improving
> correctness and completeness for things like
> getDefaultFractionDigits().
>
> I haven't yet tested this extensively, and haven't run your new
> mauve tests against it, but perhaps you'd like to take a look at
> this code and let me know what you think based on your knowledge of
> the Currency class.

The relationship between locales and currencies are pretty well 
maintained by LDML. I don't think we should try to maintain this 
ourself. E.g. the Euro was introduced 3 years ago and we still don't 
support it in GNU classpath. With autogenerated data for this from 
LDML we would give the maintenance burden away to others that do it 
anyway. We have gnu.currencyen in cp-tools. I haven't tried it yet 
but guilhem told me it's for this task.


Michael
-- 
Homepage: http://www.worldforge.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]