Skip to content

Commit 89697c3

Browse files
Karmgnu-andrew
authored andcommitted
8334653: ISO 4217 Amendment 177 Update
Reviewed-by: andrew Backport-of: b05f58e9ec57ce7f140ad47df3b5bdf4cc42f5f9
1 parent 9a426ad commit 89697c3

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

jdk/src/share/classes/java/util/CurrencyData.properties

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@ formatVersion=2
3131
# Version of the currency code information in this class.
3232
# It is a serial number that accompanies with each amendment.
3333

34-
dataVersion=176
34+
dataVersion=177
3535

3636
# List of all valid ISO 4217 currency codes.
3737
# To ensure compatibility, do not remove codes.
@@ -55,8 +55,8 @@ all=ADP020-AED784-AFA004-AFN971-ALL008-AMD051-ANG532-AOA973-ARS032-ATS040-AUD036
5555
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
5656
UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
5757
XBB956-XBC957-XBD958-XCD951-XCG532-XDR960-XFO000-XFU000-XOF952-XPD964-XPF953-\
58-
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWL932-\
59-
ZWN942-ZWR935
58+
XPT962-XSU994-XTS963-XUA965-XXX999-YER886-YUM891-ZAR710-ZMK894-ZMW967-ZWD716-ZWG924-\
59+
ZWL932-ZWN942-ZWR935
6060

6161

6262
# Mappings from ISO 3166 country codes to ISO 4217 currency codes.
@@ -579,7 +579,7 @@ YE=YER
579579
# ZAMBIA
580580
ZM=ZMW
581581
# ZIMBABWE
582-
ZW=ZWL
582+
ZW=ZWG
583583

584584

585585
# List of currencies with non-2digit decimals for minor units,

jdk/src/share/classes/sun/util/resources/CurrencyNames.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -284,6 +284,7 @@ ZAR=ZAR
284284
ZMK=ZMK
285285
ZMW=ZMW
286286
ZWD=ZWD
287+
ZWG=ZWG
287288
ZWL=ZWL
288289
ZWN=ZWN
289290
ZWR=ZWR
@@ -509,5 +510,6 @@ yum=Yugoslavian New Dinar (1994-2002)
509510
zar=South African Rand
510511
zmk=Zambian Kwacha
511512
zwd=Zimbabwean Dollar (1980-2008)
513+
zwg=Zimbabwe Gold
512514
zwl=Zimbabwean Dollar (2009)
513515
zwr=Zimbabwean Dollar (2008)

jdk/test/java/util/Currency/CheckDataVersion.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
3131
import java.security.*;
3232

3333
class CheckDataVersion {
34-
static final String datafile = "tablea1.txt";
34+
static final String datafile = "ISO4217-list-one.txt";
3535
static final String FILEVERSIONKEY = "FILEVERSION=";
3636
static final String DATAVERSIONKEY = "DATAVERSION=";
3737
static String fileVersion;

jdk/test/java/util/Currency/CurrencyTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
2323
/*
2424
* @test
2525
* @bug 4290801 4692419 4693631 5101540 5104960 6296410 6336600 6371531
26-
* 6488442 7036905 8074350 8074351
26+
* 6488442 7036905 8074350 8074351 8334653
2727
* @summary Basic tests for Currency class.
2828
*/
2929

jdk/test/java/util/Currency/tablea1.txt renamed to jdk/test/java/util/Currency/ISO4217-list-one.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#
22
#
33
# Amendments up until ISO 4217 AMENDMENT NUMBER 176
4-
# (As of 06 December 2023)
4+
# (As of 20 June 2024)
55
#
66

77
# Version
88
FILEVERSION=2
9-
DATAVERSION=176
9+
DATAVERSION=177
1010

1111
# ISO 4217 currency data
1212
AF AFN 971 2
@@ -276,7 +276,7 @@ WF XPF 953 0
276276
EH MAD 504 2
277277
YE YER 886 2
278278
ZM ZMW 967 2
279-
ZW ZWL 932 2
279+
ZW ZWG 924 2
280280
#XAU XAU 959
281281
#XBA XBA 955
282282
#XBB XBB 956

jdk/test/java/util/Currency/ValidateISO4217.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
2424
* @test
2525
* @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759
2626
* 8074350 8074351 8145952 8187946 8193552 8202026 8204269
27-
* 8208746 8209775 8274658 8283277 8296239 8321480
27+
* 8208746 8209775 8274658 8283277 8296239 8321480 8334653
2828
* @summary Validate ISO 4217 data for Currency class.
2929
*/
3030

@@ -41,7 +41,7 @@
4141
*
4242
* 1) Make a golden-data file.
4343
* From BSi's ISO4217 data (TABLE A1.doc), extract four (or eight, if currency is changing)
44-
* fields and save as ./tablea1.txt.
44+
* fields and save as ./ISO4217-list-one.txt.
4545
* <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>]
4646
* The Cutover Date is given in SimpleDateFormat's 'yyyy-MM-dd-HH-mm-ss' format in the GMT time zone.
4747
*
@@ -64,7 +64,7 @@ public class ValidateISO4217 {
6464
static final byte SKIPPED = 2;
6565

6666
/* input files */
67-
static final String datafile = "tablea1.txt";
67+
static final String datafile = "ISO4217-list-one.txt";
6868

6969
/* alpha2-code table */
7070
static byte[] codes = new byte[ALPHA_NUM * ALPHA_NUM];
@@ -98,7 +98,7 @@ public class ValidateISO4217 {
9898
+ "DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-HRK-IEP-ITL-LTL-LUF-LVL-MGF-MRO-MTL-MXV-MZM-NLG-"
9999
+ "PTE-ROL-RUR-SDD-SIT-SLL-SKK-SRG-STD-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-VED-"
100100
+ "XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-"
101-
+ "YUM-ZMK-ZWD-ZWN-ZWR";
101+
+ "YUM-ZMK-ZWD-ZWL-ZWN-ZWR";
102102

103103
static boolean err = false;
104104

0 commit comments

Comments
 (0)