Details
-
Type:
Bug
-
Status: Open
-
Priority:
P4
-
Resolution: Unresolved
-
Affects Version/s: 6u10
-
Fix Version/s: tbd
-
Component/s: globalization
-
Labels:
-
Subcomponent:
-
CPU:x86
-
OS:windows_xp
Description
FULL PRODUCT VERSION :
java 1.6.0_20
ADDITIONAL OS VERSION INFORMATION :
Ver 2002
A DESCRIPTION OF THE PROBLEM :
If locale is the default locale, US, then the customer "$" is returned. However, there are other locales that also have the "$" as their currency. These locales need to differentiate the American dollar using "US$". Currently, "USD" is returned.
Currency currency = Currency.getInstance("USD");
System.out.println(currency.getSymbol());
System.out.println(currency.getSymbol(Locale.CANADA));
System.out.println(currency.getSymbol(new Locale("en","AU")));
in the above mentioned SOPs, the value returned is $, US$ and USD respectively.
Fix for a previous BUG ID 6573250 was released so now it returns US$ for CANADA locale however I understand when the locale is Australia, it should also return US$ NOT USD
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Currency currency = Currency.getInstance("USD");
System.out.println(currency.getSymbol());
System.out.println(currency.getSymbol(Locale.CANADA));
System.out.println(currency.getSymbol(new Locale("en","AU")));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected:
$
US$
US$
ACTUAL -
Actual
$
US$
USD
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Currency currency = Currency.getInstance("USD");
System.out.println(currency.getSymbol());
System.out.println(currency.getSymbol(Locale.CANADA));
System.out.println(currency.getSymbol(new Locale("en","AU")));
---------- END SOURCE ----------
java 1.6.0_20
ADDITIONAL OS VERSION INFORMATION :
Ver 2002
A DESCRIPTION OF THE PROBLEM :
If locale is the default locale, US, then the customer "$" is returned. However, there are other locales that also have the "$" as their currency. These locales need to differentiate the American dollar using "US$". Currently, "USD" is returned.
Currency currency = Currency.getInstance("USD");
System.out.println(currency.getSymbol());
System.out.println(currency.getSymbol(Locale.CANADA));
System.out.println(currency.getSymbol(new Locale("en","AU")));
in the above mentioned SOPs, the value returned is $, US$ and USD respectively.
Fix for a previous BUG ID 6573250 was released so now it returns US$ for CANADA locale however I understand when the locale is Australia, it should also return US$ NOT USD
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Currency currency = Currency.getInstance("USD");
System.out.println(currency.getSymbol());
System.out.println(currency.getSymbol(Locale.CANADA));
System.out.println(currency.getSymbol(new Locale("en","AU")));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected:
$
US$
US$
ACTUAL -
Actual
$
US$
USD
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Currency currency = Currency.getInstance("USD");
System.out.println(currency.getSymbol());
System.out.println(currency.getSymbol(Locale.CANADA));
System.out.println(currency.getSymbol(new Locale("en","AU")));
---------- END SOURCE ----------