# HG changeset patch # User yhuang # Date 1320122292 25200 # Node ID d5d79c8cae8e18ca528c795ecc83420cb511b6ae # Parent d9ac699afc2ac4eeb3af537167c0e27b74168019# Parent bff1afbf602a2064a4842814f8496e5ae80d0fd5 Merge diff -r d9ac699afc2a -r d5d79c8cae8e jdk/src/share/classes/java/util/CurrencyData.properties --- a/jdk/src/share/classes/java/util/CurrencyData.properties Mon Oct 31 21:30:11 2011 -0700 +++ b/jdk/src/share/classes/java/util/CurrencyData.properties Mon Oct 31 21:38:12 2011 -0700 @@ -71,7 +71,7 @@ # # The table is based on the following web sites: # http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/db_en.html -# http://www.bsi-global.com/iso4217currency +# http://www.currency-iso.org/iso_index/iso_tables.htm # http://www.cia.gov/cia/publications/factbook/indexgeo.html # AFGHANISTAN @@ -105,7 +105,7 @@ # AUSTRIA AT=EUR # AZERBAIJAN -AZ=AZM;2005-12-31-20-00-00;AZN +AZ=AZN # BAHAMAS BS=BSD # BAHRAIN @@ -378,7 +378,7 @@ # MOROCCO MA=MAD # MOZAMBIQUE -MZ=MZM;2006-06-30-22-00-00;MZN +MZ=MZN # MYANMAR MM=MMK # NAMIBIA @@ -440,7 +440,7 @@ # REUNION RE=EUR # ROMANIA -RO=ROL;2005-06-30-21-00-00;RON +RO=RON # RUSSIAN FEDERATION RU=RUB # RWANDA @@ -532,7 +532,7 @@ # TUNISIA TN=TND # TURKEY -TR=TRL;2004-12-31-22-00-00;TRY +TR=TRY # TURKMENISTAN TM=TMT # TURKS AND CAICOS ISLANDS @@ -558,7 +558,7 @@ # VANUATU VU=VUV # VENEZUELA -VE=VEB;2008-01-01-04-00-00;VEF +VE=VEF # VIET NAM VN=VND # VIRGIN ISLANDS, BRITISH diff -r d9ac699afc2a -r d5d79c8cae8e jdk/test/java/util/Currency/CurrencyTest.java --- a/jdk/test/java/util/Currency/CurrencyTest.java Mon Oct 31 21:30:11 2011 -0700 +++ b/jdk/test/java/util/Currency/CurrencyTest.java Mon Oct 31 21:38:12 2011 -0700 @@ -128,18 +128,20 @@ checkCountryCurrency(country1[i], currency1[i]); } - // check currency changes - String[] switchOverCtry = {"DE", "FR", "ES", "IT", "NL", "BE", "TR", "RO", "AZ", "MZ", "GH", "VE"}; - String[] switchOverOld = {"DEM", "FRF", "ESP", "ITL", "NLG", "BEF", "TRL", "ROL", "AZM", "MZM", "GHC", "VEB"}; - String[] switchOverNew = {"EUR", "EUR", "EUR", "EUR", "EUR", "EUR", "TRY", "RON", "AZN", "MZN", "GHS", "VEF"}; - String[] switchOverTZ = {"Europe/Paris", "Europe/Paris", "Europe/Paris", "Europe/Paris", - "Europe/Paris", "Europe/Paris", "Asia/Istanbul", "Europe/Bucharest", - "Asia/Baku", "Africa/Maputo", "Africa/Accra", "America/Caracas"}; - int[] switchOverYear = {2002, 2002, 2002, 2002, 2002, 2002, 2005, 2005, 2006, 2006, 2007, 2008}; - int[] switchOverMonth = {Calendar.JANUARY, Calendar.JANUARY, Calendar.JANUARY, Calendar.JANUARY, - Calendar.JANUARY, Calendar.JANUARY, Calendar.JANUARY, Calendar.JULY, - Calendar.JANUARY, Calendar.JULY, Calendar.JULY, Calendar.JANUARY}; - int[] switchOverDay = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + /* + * check currency changes + * In current implementation, there is no data of old currency and transition date at jdk/src/share/classes/java/util/CurrencyData.properties. + * So, all the switch data arrays are empty. In the future, if data of old currency and transition date are necessary for any country, the + * arrays here can be updated so that the program can check the currency switch. + */ + String[] switchOverCtry = {}; + String[] switchOverOld = {}; + String[] switchOverNew = {}; + String[] switchOverTZ = {}; + int[] switchOverYear = {}; + int[] switchOverMonth = {}; + int[] switchOverDay = {}; + for (int i = 0; i < switchOverCtry.length; i++) { TimeZone.setDefault(TimeZone.getTimeZone(switchOverTZ[i])); Calendar date = new GregorianCalendar(switchOverYear[i], switchOverMonth[i], switchOverDay[i]); diff -r d9ac699afc2a -r d5d79c8cae8e jdk/test/java/util/Currency/ValidateISO4217.java --- a/jdk/test/java/util/Currency/ValidateISO4217.java Mon Oct 31 21:30:11 2011 -0700 +++ b/jdk/test/java/util/Currency/ValidateISO4217.java Mon Oct 31 21:38:12 2011 -0700 @@ -92,7 +92,7 @@ /* Codes that are obsolete, do not have related country */ static final String otherCodes = - "ADP-AFA-ATS-AYM-BEF-BGL-BOV-BYB-CLF-CUC-CYP-DEM-EEK-ESP-FIM-FRF-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-NLG-PTE-RUR-SDD-SIT-SKK-SRG-TMM-TPE-TRL-VEF-USN-USS-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-YUM-ZWD-ZWN-ZWR"; + "ADP-AFA-ATS-AYM-AZM-BEF-BGL-BOV-BYB-CLF-CUC-CYP-DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-IEP-ITL-LUF-MGF-MTL-MXV-MZM-NLG-PTE-ROL-RUR-SDD-SIT-SKK-SRG-TMM-TPE-TRL-VEF-USN-USS-VEB-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-YUM-ZWD-ZWN-ZWR"; static boolean err = false; diff -r d9ac699afc2a -r d5d79c8cae8e jdk/test/java/util/Currency/tablea1.txt --- a/jdk/test/java/util/Currency/tablea1.txt Mon Oct 31 21:30:11 2011 -0700 +++ b/jdk/test/java/util/Currency/tablea1.txt Mon Oct 31 21:38:12 2011 -0700 @@ -23,7 +23,7 @@ AU AUD 36 2 AT EUR 978 2 # MA 129 -AZ AZM 31 2 2005-12-31-20-00-00 AZN 944 2 +AZ AZN 944 2 BS BSD 44 2 BH BHD 48 3 BD BDT 50 2 @@ -96,7 +96,7 @@ GM GMD 270 2 GE GEL 981 2 DE EUR 978 2 -GH GHC 288 2 2007-07-01-00-00-00 GHS 936 2 +GH GHS 936 2 GI GIP 292 2 GR EUR 978 2 GL DKK 208 2 @@ -166,7 +166,7 @@ MS XCD 951 2 MA MAD 504 2 # MA 130 -MZ MZM 508 2 2006-06-30-22-00-00 MZN 943 2 +MZ MZN 943 2 MM MMK 104 2 # MA 134 ME EUR 978 2 @@ -200,7 +200,7 @@ PR USD 840 2 QA QAR 634 2 RE EUR 978 2 -RO ROL 946 2 2005-06-30-21-00-00 RON 946 2 +RO RON 946 2 RU RUB 643 2 RW RWF 646 0 SH SHP 654 2 @@ -266,7 +266,7 @@ UY UYU 858 2 UZ UZS 860 2 VU VUV 548 0 -VE VEB 862 2 2008-01-01-04-00-00 VEF 937 2 +VE VEF 937 2 VN VND 704 2 VG USD 840 2 VI USD 840 2