-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b120
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
According to the java.util.Currency API: Users can supersede the Java runtime currency data by creating a properties file named <JAVA_HOME>/lib/currency.properties.
The example given works:
JP=JPZ,999,0
However, this does not:
JP=ABC,999,0
The above currency.properties file gives "JPC" as the currency code rather than "ABC".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create currency.properties file that looks like this:
JP=ABC,999,0
2. Check list of available currencies (Currency.getAvailableCurrencies())
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
List of currencies including "ABC"
ACTUAL -
List of currencies including "JPC"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.*;
public class CurrencyTest {
public static void main(String[] args) {
for(Currency c : Currency.getAvailableCurrencies())
System.out.println(c.getCurrencyCode());
}
}
---------- END SOURCE ----------
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) Client VM (build 21.1-b02, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
According to the java.util.Currency API: Users can supersede the Java runtime currency data by creating a properties file named <JAVA_HOME>/lib/currency.properties.
The example given works:
JP=JPZ,999,0
However, this does not:
JP=ABC,999,0
The above currency.properties file gives "JPC" as the currency code rather than "ABC".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create currency.properties file that looks like this:
JP=ABC,999,0
2. Check list of available currencies (Currency.getAvailableCurrencies())
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
List of currencies including "ABC"
ACTUAL -
List of currencies including "JPC"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.*;
public class CurrencyTest {
public static void main(String[] args) {
for(Currency c : Currency.getAvailableCurrencies())
System.out.println(c.getCurrencyCode());
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-8213072 currency.properties doesn't supersede for NOK currency code
-
- Closed
-