RFR: 8264061: LocalDateTimeStringConverterTest fails in Canada
John Neffenger
jgneff at openjdk.java.net
Tue Mar 23 18:30:48 UTC 2021
As the comment in the test case mentions, "Tests require that default locale is en_US." The default locale is required by the objects created in the static method `implementations`, marked with the JUnit annotation `@Parameterized.Parameters`. So the static method `initDefaultLocale`, marked with the JUnit annotation `@BeforeClass`, calls the method to set the required default: `Locale.setDefault(Locale.US)`.
The problem occurs because the `@Parameterized.Parameters` method is called before the `@BeforeClass` method, so the system locale is used as the default instead of `Locale.US`.
The fix is to move the call to the first instruction of the `@Parameterized.Parameters` method so that the default is set before it's required.
-------------
Commit messages:
- 8264061: LocalDateTimeStringConverterTest fails in Canada
Changes: https://git.openjdk.java.net/jfx/pull/438/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=438&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8264061
Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
Patch: https://git.openjdk.java.net/jfx/pull/438.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/438/head:pull/438
PR: https://git.openjdk.java.net/jfx/pull/438
More information about the openjfx-dev
mailing list