You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jin Yang (JIRA)" <ji...@apache.org> on 2010/09/25 07:42:33 UTC
[jira] Created: (HARMONY-6654)
[classlib][luni]util:currency.getInstance does not throw
IllegalArgumentException
[classlib][luni]util:currency.getInstance does not throw IllegalArgumentException
---------------------------------------------------------------------------------
Key: HARMONY-6654
URL: https://issues.apache.org/jira/browse/HARMONY-6654
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Jin Yang
executing this code
Currency c = Currency.getInstance("ABC");
System.out.prvintln(c);
we get ABC as output in HS where as on SUN ri we get IllegalArgumentException because ABC is not a supported ISO 4217 code.
In our current design for getInstance(String currencyCode), we do not check the input currencyCode. If we use icu to check, it still doesn't work. ICU just checks if the input is a 3-letter alpha code while not to check if the input is a supported ISO 4217 code. So for ICU, "ABC" is also a valid input.
I think there 2 two ways to fix it:
1. ask ICU to check the input.
2. maintain a ISO 4217 code list in our implementation and to check the input by ourself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.