This PR fixes a test bug where a `DecimalFormat` is instantiated in a static field (with the current default locale) before the test updates the system default to `Locale.US`. As a result, it may fail under various other locales, since a `Locale.US` configured `DecimalFormat` is not actually retrieved and the test expects one.
In general, the preservation and restoring of the system locale is an obsolete process. The test is instead updated to just retrieve a `DecimalFormat` using a locale accepting factory method. I have manually confirmed that the tests passes with `-Duser.language=en -Duser.country=NL` on my machine, (which is the locale used in the reproducer). ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/28514/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28514&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8372609 Stats: 21 lines in 1 file changed: 0 ins; 17 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/28514.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/28514/head:pull/28514 PR: https://git.openjdk.org/jdk/pull/28514
