8334653: ISO 4217 Amendment 177 Update

Reviewed-by: naoto
This commit is contained in:
Justin Lu 2024-06-25 19:05:22 +00:00
parent 861aefcafa
commit 86b0cf259f
6 changed files with 23 additions and 20 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -287,6 +287,7 @@ ZAR=ZAR
ZMK=ZMK
ZMW=ZMW
ZWD=ZWD
ZWG=ZWG
ZWL=ZWL
ZWN=ZWN
ZWR=ZWR
@ -512,5 +513,6 @@ yum=Yugoslavian New Dinar (1994-2002)
zar=South African Rand
zmk=Zambian Kwacha
zwd=Zimbabwean Dollar (1980-2008)
zwg=Zimbabwe Gold
zwl=Zimbabwean Dollar (2009)
zwr=Zimbabwean Dollar (2008)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -32,7 +32,7 @@ formatVersion=3
# Version of the currency code information in this class.
# It is a serial number that accompanies with each amendment.
dataVersion=176
dataVersion=177
# List of all valid ISO 4217 currency codes.
# To ensure compatibility, do not remove codes.
@ -56,8 +56,8 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
XBB956-XBC957-XBD958-XCD951-XCG532-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWL932-\
ZWN942-ZWR935
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWG924-\
ZWL932-ZWN942-ZWR935
# Mappings from ISO 3166 country codes to ISO 4217 currency codes.
@ -582,7 +582,7 @@ YE=YER
# ZAMBIA
ZM=ZMW
# ZIMBABWE
ZW=ZWL
ZW=ZWG
# List of currencies with non-2digit decimals for minor units,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ import java.security.PrivilegedAction;
import java.util.Currency;
class CheckDataVersion {
static final String datafile = "tablea1.txt";
static final String datafile = "ISO4217-list-one.txt";
static final String FILEVERSIONKEY = "FILEVERSION=";
static final String DATAVERSIONKEY = "DATAVERSION=";
static String fileVersion;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
* @test
* @bug 4290801 4692419 4693631 5101540 5104960 6296410 6336600 6371531
* 6488442 7036905 8008577 8039317 8074350 8074351 8150324 8167143
* 8264792
* 8264792 8334653
* @summary Basic tests for Currency class.
* @modules java.base/java.util:open
* jdk.localedata
@ -59,7 +59,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class CurrencyTest {
// 'tablea1.txt' should be up-to-date before testing
// 'ISO4217-list-one.txt' should be up-to-date before testing
@Test
public void dataVersionTest() {
CheckDataVersion.check();

View File

@ -1,12 +1,12 @@
#
#
# Amendments up until ISO 4217 AMENDMENT NUMBER 176
# (As of 06 December 2023)
# Amendments up until ISO 4217 AMENDMENT NUMBER 177
# (As of 20 June 2024)
#
# Version
FILEVERSION=3
DATAVERSION=176
DATAVERSION=177
# ISO 4217 currency data
AF AFN 971 2
@ -276,7 +276,7 @@ WF XPF 953 0
EH MAD 504 2
YE YER 886 2
ZM ZMW 967 2
ZW ZWL 932 2
ZW ZWG 924 2
#XAU XAU 959
#XBA XBA 955
#XBB XBB 956

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
* @test
* @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759
* 8039317 8074350 8074351 8145952 8187946 8193552 8202026 8204269
* 8208746 8209775 8264792 8274658 8283277 8296239 8321480
* 8208746 8209775 8264792 8274658 8283277 8296239 8321480 8334653
* @summary Validate ISO 4217 data for Currency class.
* @modules java.base/java.util:open
* jdk.localedata
@ -60,7 +60,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* This class tests the latest ISO 4217 data and Java's currency data which is
* based on ISO 4217. The golden-data file (ISO 4217 data) 'tablea1.txt' has the following
* based on ISO 4217. The golden-data file, 'ISO4217-list-one.txt', based on the
* List one: Currency, fund and precious metal codes has the following
* format: <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>]
* The Cutover Date is given in SimpleDateFormat's 'yyyy-MM-dd-HH-mm-ss' format in the GMT time zone.
*/
@ -68,7 +69,7 @@ public class ValidateISO4217 {
// Input golden-data file
private static final File dataFile = new File(System.getProperty(
"test.src", "."), "tablea1.txt");
"test.src", "."), "ISO4217-list-one.txt");
// Code statuses
private static final byte UNDEFINED = 0;
private static final byte DEFINED = 1;
@ -89,7 +90,7 @@ public class ValidateISO4217 {
+ "DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-HRK-IEP-ITL-LTL-LUF-LVL-MGF-MRO-MTL-MXV-MZM-NLG-"
+ "PTE-ROL-RUR-SDD-SIT-SLL-SKK-SRG-STD-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-VED-"
+ "XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-"
+ "YUM-ZMK-ZWD-ZWN-ZWR";
+ "YUM-ZMK-ZWD-ZWL-ZWN-ZWR";
private static final String[][] extraCodes = {
/* Defined in ISO 4217 list, but don't have code and minor unit info. */
{"AQ", "", "", "0"}, // Antarctica