On Fri, 18 Nov 2022 17:10:04 GMT, Marius Hanl <mh...@openjdk.org> wrote:
>> That is a fair point. >> >> I'll have to change the code a bit, as `implementations()` method is called >> before a `@BeforeClass`-tagged method (which is probably why originally >> `Locale.setDefault()` was called there) and `aFormatter`/`aParser` are >> already used there, expected to be initialized. > > Maybe JUnit5 can help you here. > You can check out my recently merged PR for an example for the usage of the > parameterized api introduced in JUnit5. > https://github.com/openjdk/jfx/pull/936 I guess they fixed this rather irritating "feature" in JUnit5. Another, possibly less-intrusive, approach would be to initialize all of the static fields in a `static { ... }` block (with a comment as to why you can't use an `@BeforeClass` method. ------------- PR: https://git.openjdk.org/jfx/pull/954