[jdk8u-dev] RFR: 8299439: java/text/Format/NumberFormat/CurrencyFormat.java fails for hr_HR
Andrew John Hughes
andrew at openjdk.org
Wed Jan 11 03:03:43 UTC 2023
This is a mostly clean backport from 11u. The only difference is the `ProblemList.txt` copyright header change didn't apply, so I just omitted this. It seems odd to include such a change when there are no changes to the content of the file. Maybe this makes sense for 11+ where the file is more in sync with trunk, but it will actually create problems in 8u backporting earlier fixes.
There are actually two fixes here, which may not be clear from the original bug:
1. The test data for the `CurrencyFormat.java` test still expects `hr_HR` to return `Kn` and hasn't been updated following Croatia's move to the Euro.
2. When that is corrected, there is still a mismatch because the JDK is not converting the currency code `EUR` to the Euro symbol. The same change to `CurrencyNames_hr_HR.properties` is required as was made to `CurrencyNames_lt_LT.properties` for [Lithuania's move to the Euro in 2014](https://github.com/openjdk/jdk8u/commit/f11ce28bbcba7d0c07c2340a748a828efe5d454f#diff-3f1199e2404f201dd0f738feb6f5c03de95013dda69e1896fc74ca0ed0e6f29a)
The above was verified by running the unpatched test against an unpatched JDK (`"Wrong currency symbol for locale hr_HR, expected: Kn, got: EUR"`), the patched test against an unpatched JDK (`"Wrong currency symbol for locale hr_HR, expected: \u20ac, got: EUR"`) and the patched test against a patched JDK (both `\u20AC`). Only the last of these passes.
The patch also removes the long redundant time dependencies for Lithuania and Latvia.
-------------
Commit messages:
- Backport 80eecc50e663155f04dcec1797efb4be4b8ee7b2
Changes: https://git.openjdk.org/jdk8u-dev/pull/228/files
Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=228&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8299439
Stats: 5 lines in 2 files changed: 1 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk8u-dev/pull/228.diff
Fetch: git fetch https://git.openjdk.org/jdk8u-dev pull/228/head:pull/228
PR: https://git.openjdk.org/jdk8u-dev/pull/228
More information about the jdk8u-dev
mailing list