bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/22843] java.util.Currency should be changed so as to less


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22843] java.util.Currency should be changed so as to less depend on locales
Date: 16 Oct 2005 01:27:25 -0000

At present, our implementation of java.util.Currency.getInstance(String) is
non-deterministic; it will return the Currency instance for the locale it finds
first, rather than for a determined locale.  The locale is irrelevant to the
actual Currency instance, and we should not depend on it.  Instead of
getInstance(String) using getInstance(Locale), the two should work in reverse,
with getInstance(Locale) looking up a code which is handed to
getInstance(String).  This requires two mappings instead of our one; Locale ->
String and String -> Currency.  This also prevents the creation of multiple
identical Currency instances, when keyed by Locale.  This will also solve our
ReferenceEquality currency testcase.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22843





reply via email to

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