From 89697c3c19f1276e92c6955600730b8d3353c4ea Mon Sep 17 00:00:00 2001 From: Karm Michal Babacek Date: Fri, 23 Aug 2024 12:03:49 +0000 Subject: [PATCH] 8334653: ISO 4217 Amendment 177 Update Reviewed-by: andrew Backport-of: b05f58e9ec57ce7f140ad47df3b5bdf4cc42f5f9 --- .../share/classes/java/util/CurrencyData.properties | 10 +++++----- .../sun/util/resources/CurrencyNames.properties | 4 +++- jdk/test/java/util/Currency/CheckDataVersion.java | 4 ++-- jdk/test/java/util/Currency/CurrencyTest.java | 4 ++-- .../Currency/{tablea1.txt => ISO4217-list-one.txt} | 6 +++--- jdk/test/java/util/Currency/ValidateISO4217.java | 10 +++++----- 6 files changed, 20 insertions(+), 18 deletions(-) rename jdk/test/java/util/Currency/{tablea1.txt => ISO4217-list-one.txt} (98%) diff --git a/jdk/src/share/classes/java/util/CurrencyData.properties b/jdk/src/share/classes/java/util/CurrencyData.properties index 2c9cafac7a6..89b2437c693 100644 --- a/jdk/src/share/classes/java/util/CurrencyData.properties +++ b/jdk/src/share/classes/java/util/CurrencyData.properties @@ -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 @@ -31,7 +31,7 @@ formatVersion=2 # 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. @@ -55,8 +55,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. @@ -579,7 +579,7 @@ YE=YER # ZAMBIA ZM=ZMW # ZIMBABWE -ZW=ZWL +ZW=ZWG # List of currencies with non-2digit decimals for minor units, diff --git a/jdk/src/share/classes/sun/util/resources/CurrencyNames.properties b/jdk/src/share/classes/sun/util/resources/CurrencyNames.properties index c231cadc416..3ed4f873a3c 100644 --- a/jdk/src/share/classes/sun/util/resources/CurrencyNames.properties +++ b/jdk/src/share/classes/sun/util/resources/CurrencyNames.properties @@ -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 @@ -284,6 +284,7 @@ ZAR=ZAR ZMK=ZMK ZMW=ZMW ZWD=ZWD +ZWG=ZWG ZWL=ZWL ZWN=ZWN ZWR=ZWR @@ -509,5 +510,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) diff --git a/jdk/test/java/util/Currency/CheckDataVersion.java b/jdk/test/java/util/Currency/CheckDataVersion.java index be8b9417c68..3c62e5cd716 100644 --- a/jdk/test/java/util/Currency/CheckDataVersion.java +++ b/jdk/test/java/util/Currency/CheckDataVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 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 @@ -31,7 +31,7 @@ import java.security.*; 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; diff --git a/jdk/test/java/util/Currency/CurrencyTest.java b/jdk/test/java/util/Currency/CurrencyTest.java index cb6d35a2a9f..15d9e1c2125 100644 --- a/jdk/test/java/util/Currency/CurrencyTest.java +++ b/jdk/test/java/util/Currency/CurrencyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, 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 @@ -23,7 +23,7 @@ /* * @test * @bug 4290801 4692419 4693631 5101540 5104960 6296410 6336600 6371531 - * 6488442 7036905 8074350 8074351 + * 6488442 7036905 8074350 8074351 8334653 * @summary Basic tests for Currency class. */ diff --git a/jdk/test/java/util/Currency/tablea1.txt b/jdk/test/java/util/Currency/ISO4217-list-one.txt similarity index 98% rename from jdk/test/java/util/Currency/tablea1.txt rename to jdk/test/java/util/Currency/ISO4217-list-one.txt index e0d2c31ed70..0561adb4425 100644 --- a/jdk/test/java/util/Currency/tablea1.txt +++ b/jdk/test/java/util/Currency/ISO4217-list-one.txt @@ -1,12 +1,12 @@ # # # Amendments up until ISO 4217 AMENDMENT NUMBER 176 -# (As of 06 December 2023) +# (As of 20 June 2024) # # Version FILEVERSION=2 -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 diff --git a/jdk/test/java/util/Currency/ValidateISO4217.java b/jdk/test/java/util/Currency/ValidateISO4217.java index 8148c80fc80..e26769b6b8b 100644 --- a/jdk/test/java/util/Currency/ValidateISO4217.java +++ b/jdk/test/java/util/Currency/ValidateISO4217.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2022, 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 @@ -24,7 +24,7 @@ * @test * @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759 * 8074350 8074351 8145952 8187946 8193552 8202026 8204269 - * 8208746 8209775 8274658 8283277 8296239 8321480 + * 8208746 8209775 8274658 8283277 8296239 8321480 8334653 * @summary Validate ISO 4217 data for Currency class. */ @@ -41,7 +41,7 @@ * * 1) Make a golden-data file. * From BSi's ISO4217 data (TABLE A1.doc), extract four (or eight, if currency is changing) - * fields and save as ./tablea1.txt. + * fields and save as ./ISO4217-list-one.txt. * \t\t\t[\t\t\t\t] * The Cutover Date is given in SimpleDateFormat's 'yyyy-MM-dd-HH-mm-ss' format in the GMT time zone. * @@ -64,7 +64,7 @@ public class ValidateISO4217 { static final byte SKIPPED = 2; /* input files */ - static final String datafile = "tablea1.txt"; + static final String datafile = "ISO4217-list-one.txt"; /* alpha2-code table */ static byte[] codes = new byte[ALPHA_NUM * ALPHA_NUM]; @@ -98,7 +98,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"; static boolean err = false;