On Thu, 7 Dec 2023 19:43:14 GMT, Justin Lu <[email protected]> wrote:
> Please review this PR which incorporates the ISO 4217 Amendment 176 Update.
> As the replacement of `ANG` to `XCG` won't occur until 2025, this change does
> not need to go into JDK22. `HR` was also updated to remove the past cutover
> dates.
>
> An existing test in _ValidateISO4217.java_ checked that
> `Currency::getAvailableCurrencies` had all the expected currencies. This
> method returns all currencies, including ones to take place in the future
> (e.g. `XCG`). The expected currencies `Set` the method was test against had
> to be updated to also include future currencies as well.
>
> Additionally, this change also converted a parameterized test to a normal
> JUnit test, due to output overflow.
src/java.base/share/classes/sun/util/resources/CurrencyNames.properties line
497:
> 495: xbd=European Unit of Account (XBD)
> 496: xcd=East Caribbean Dollar
> 497: xcg=Caribbean Guilder
I think `XCG=XCG` is also needed for not throwing `MissingResourceException`
for `getSymbol()`
test/jdk/java/util/Currency/ValidateISO4217.java line 181:
> 179: // without updating ISO4217Codes
> 180: String futureCurr = tokens.nextToken();
> 181: testCurrencies.add(Currency.getInstance(futureCurr));
I'd not add the future currency, and fix it in the code not to add future
currency in available currencies.
test/jdk/java/util/Currency/ValidateISO4217.java line 289:
> 287: assertNull(Currency.getInstance(Locale.of("", country)),
> 288: "Error: Currency.getInstance() for this locale
> should return null: " + country);
> 289: }
What is this change for?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17023#discussion_r1419721244
PR Review Comment: https://git.openjdk.org/jdk/pull/17023#discussion_r1419722063
PR Review Comment: https://git.openjdk.org/jdk/pull/17023#discussion_r1419722636