Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
/ jdk23u Public archive

Commit bbbfb7f

Browse files
Weibing XiaoRealCLanger
Weibing Xiao
authored andcommitted
8334653: ISO 4217 Amendment 177 Update
Reviewed-by: naoto Backport-of: 86b0cf2
1 parent 2723ffa commit bbbfb7f

File tree

6 files changed

+23
-20
lines changed

6 files changed

+23
-20
lines changed

src/java.base/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
@@ -287,6 +287,7 @@ ZAR=ZAR
287287
ZMK=ZMK
288288
ZMW=ZMW
289289
ZWD=ZWD
290+
ZWG=ZWG
290291
ZWL=ZWL
291292
ZWN=ZWN
292293
ZWR=ZWR
@@ -512,5 +513,6 @@ yum=Yugoslavian New Dinar (1994-2002)
512513
zar=South African Rand
513514
zmk=Zambian Kwacha
514515
zwd=Zimbabwean Dollar (1980-2008)
516+
zwg=Zimbabwe Gold
515517
zwl=Zimbabwean Dollar (2009)
516518
zwr=Zimbabwean Dollar (2008)

src/java.base/share/data/currency/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
@@ -32,7 +32,7 @@ formatVersion=3
3232
# Version of the currency code information in this class.
3333
# It is a serial number that accompanies with each amendment.
3434

35-
dataVersion=176
35+
dataVersion=177
3636

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

6262

6363
# Mappings from ISO 3166 country codes to ISO 4217 currency codes.
@@ -582,7 +582,7 @@ YE=YER
582582
# ZAMBIA
583583
ZM=ZMW
584584
# ZIMBABWE
585-
ZW=ZWL
585+
ZW=ZWG
586586

587587

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2023, 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
@@ -38,7 +38,7 @@
3838
import java.util.Currency;
3939

4040
class CheckDataVersion {
41-
static final String datafile = "tablea1.txt";
41+
static final String datafile = "ISO4217-list-one.txt";
4242
static final String FILEVERSIONKEY = "FILEVERSION=";
4343
static final String DATAVERSIONKEY = "DATAVERSION=";
4444
static String fileVersion;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2023, 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
@@ -25,7 +25,7 @@
2525
* @test
2626
* @bug 4290801 4692419 4693631 5101540 5104960 6296410 6336600 6371531
2727
* 6488442 7036905 8008577 8039317 8074350 8074351 8150324 8167143
28-
* 8264792
28+
* 8264792 8334653
2929
* @summary Basic tests for Currency class.
3030
* @modules java.base/java.util:open
3131
* jdk.localedata
@@ -59,7 +59,7 @@
5959

6060
public class CurrencyTest {
6161

62-
// 'tablea1.txt' should be up-to-date before testing
62+
// 'ISO4217-list-one.txt' should be up-to-date before testing
6363
@Test
6464
public void dataVersionTest() {
6565
CheckDataVersion.check();

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

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

77
# Version
88
FILEVERSION=3
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

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2007, 2023, 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
@@ -25,7 +25,7 @@
2525
* @test
2626
* @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759
2727
* 8039317 8074350 8074351 8145952 8187946 8193552 8202026 8204269
28-
* 8208746 8209775 8264792 8274658 8283277 8296239 8321480
28+
* 8208746 8209775 8264792 8274658 8283277 8296239 8321480 8334653
2929
* @summary Validate ISO 4217 data for Currency class.
3030
* @modules java.base/java.util:open
3131
* jdk.localedata
@@ -60,15 +60,16 @@
6060

6161
/**
6262
* This class tests the latest ISO 4217 data and Java's currency data which is
63-
* based on ISO 4217. The golden-data file (ISO 4217 data) 'tablea1.txt' has the following
63+
* based on ISO 4217. The golden-data file, 'ISO4217-list-one.txt', based on the
64+
* “List one: Currency, fund and precious metal codes” has the following
6465
* 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>]
6566
* The Cutover Date is given in SimpleDateFormat's 'yyyy-MM-dd-HH-mm-ss' format in the GMT time zone.
6667
*/
6768
public class ValidateISO4217 {
6869

6970
// Input golden-data file
7071
private static final File dataFile = new File(System.getProperty(
71-
"test.src", "."), "tablea1.txt");
72+
"test.src", "."), "ISO4217-list-one.txt");
7273
// Code statuses
7374
private static final byte UNDEFINED = 0;
7475
private static final byte DEFINED = 1;
@@ -89,7 +90,7 @@ public class ValidateISO4217 {
8990
+ "DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-HRK-IEP-ITL-LTL-LUF-LVL-MGF-MRO-MTL-MXV-MZM-NLG-"
9091
+ "PTE-ROL-RUR-SDD-SIT-SLL-SKK-SRG-STD-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-VED-"
9192
+ "XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-"
92-
+ "YUM-ZMK-ZWD-ZWN-ZWR";
93+
+ "YUM-ZMK-ZWD-ZWL-ZWN-ZWR";
9394
private static final String[][] extraCodes = {
9495
/* Defined in ISO 4217 list, but don't have code and minor unit info. */
9596
{"AQ", "", "", "0"}, // Antarctica

0 commit comments

Comments
 (0)