Skip to content

Commit

Permalink
8334653: ISO 4217 Amendment 177 Update
Browse files Browse the repository at this point in the history
Reviewed-by: andrew
Backport-of: b05f58e9ec57ce7f140ad47df3b5bdf4cc42f5f9
  • Loading branch information
Karm authored and gnu-andrew committed Aug 23, 2024
1 parent 9a426ad commit 89697c3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
10 changes: 5 additions & 5 deletions jdk/src/share/classes/java/util/CurrencyData.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -579,7 +579,7 @@ YE=YER
# ZAMBIA
ZM=ZMW
# ZIMBABWE
ZW=ZWL
ZW=ZWG


# List of currencies with non-2digit decimals for minor units,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -284,6 +284,7 @@ ZAR=ZAR
ZMK=ZMK
ZMW=ZMW
ZWD=ZWD
ZWG=ZWG
ZWL=ZWL
ZWN=ZWN
ZWR=ZWR
Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions jdk/test/java/util/Currency/CheckDataVersion.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions jdk/test/java/util/Currency/CurrencyTest.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions jdk/test/java/util/Currency/ValidateISO4217.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
*/

Expand All @@ -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.
* <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.
*
Expand All @@ -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];
Expand Down Expand Up @@ -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;

Expand Down

1 comment on commit 89697c3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.