3909N/A * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 4358N/A * @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 0N/A * @summary Validate ISO 4217 data for Currency class. 0N/A * ############################################################################ 0N/A * ValidateISO4217 is a tool to detect differences between the latest ISO 4217 0N/A * data and and Java's currency data which is based on ISO 4217. 0N/A * If there is a difference, the following file which includes currency data 0N/A * may need to be updated. 0N/A * ############################################################################ 0N/A * 1) Make a golden-data file. 0N/A * From BSi's ISO4217 data (TABLE A1.doc), extract four (or eight, if currency is changing) 0N/A * <Country code>\t<Currency code>\t<Numeric code>\t<Minor unit>[\t<Cutover Date>\t<new Currency code>\t<new Numeric code>\t<new Minor unit>] 0N/A * The Cutover Date is given in SimpleDateFormat's 'yyyy-MM-dd-HH-mm-ss' format in the GMT time zone. 0N/A * 3) Execute ValidateISO4217 as follows: 0N/A * java ValidateISO4217 0N/A /* alpha2-code table */ 0N/A /* Defined in ISO 4217 list, but don't have code and minor unit info. */ 0N/A {
"AQ",
"",
"",
"0"},
// Antarctica 0N/A * Defined in ISO 4217 list, but don't have code and minor unit info in 0N/A * it. On the othe hand, both code and minor unit are defined in 0N/A * .properties file. I don't know why, though. 0N/A {
"GS",
"GBP",
"826",
"2"},
// South Georgia And The South Sandwich Islands 0N/A /* Not defined in ISO 4217 list, but defined in .properties file. */ 0N/A {
"AX",
"EUR",
"978",
"2"},
// \u00c5LAND ISLANDS 0N/A {
"PS",
"ILS",
"376",
"2"},
// Palestinian Territory, Occupied 0N/A /* Not defined in ISO 4217 list, but added in ISO 3166 country code list */ 0N/A {
"JE",
"GBP",
"826",
"2"},
// Jersey 0N/A {
"GG",
"GBP",
"826",
"2"},
// Guernsey 0N/A {
"IM",
"GBP",
"826",
"2"},
// Isle of Man 831N/A {
"BL",
"EUR",
"978",
"2"},
// Saint Barthelemy 831N/A {
"MF",
"EUR",
"978",
"2"},
// Saint Martin 0N/A /* Codes that are obsolete, do not have related country */ 4358N/A "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";
0N/A System.
err.
println(
"Error: This should be an undefined code and throw IllegalArgumentException: " +
0N/A * This test depends on test1(), where 'testCurrencies' set is constructed 0N/A System.
err.
print(
"Error: getAvailableCurrencies() returned extra currencies than expected: ");