On Tue, 6 May 2025 07:25:36 GMT, Abhishek N <d...@openjdk.org> wrote:
> Create a Test case to have special cases coverage for currency.getInstance(). > > The test Validates that all currency codes and country-currency mappings in > the input file are consistent with the Java Currency API. > > test results: > > jdk-24.0.2/bin/java -jar jtreg/lib/jtreg.jar -testjdk:jdk-24.0.2 > -dir:jdk/test/jdk/ > java/util/Currency/currencyEnhancedCoverage/ValidateCurrencyCoverage.java > Directory "JTwork" not found: creating > Directory "JTreport" not found: creating > Test results: passed: 1 > Report written to JTreport\html\report.html > Results written to JTwork Hi @abhn-git, thanks for contributing the test but it's not clear to me what the purpose of this PR is. It seems to be testing the Currency overriding mechanism via the system property but that behavior is already tested. If you are attempting to test the future cut-over behavior for a standard ISO 4217 currency in `currencyData.properties`, the override mechanism does not simulate this 1-1. For a standard ISO 4217 currency in `currencyData.properties`, a currency transition for a locale can occur at any time, (i.e. subsequent `getInstance(Locale)` calls can return different currencies). For the override mechanism, the transition is checked in the static block, and the resulting currency selected is fixed for the duration of the application's lifecycle. ------------- Changes requested by jlu (Committer). PR Review: https://git.openjdk.org/jdk/pull/25057#pullrequestreview-2829069916