On Wed, 23 Nov 2022 23:14:52 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> I can replace these with an assert: >> >> assertTrue(Toolkit.getToolkit() instanceof StubToolkit); > > I wouldn't recommend that, since it will then obscure the main reason for > this call -- to load the toolkit (honestly, the cast was probably an > afterthought). So this would be OK: > > > tk = Toolkit.getToolkit();//This step is not needed (Just to make > sure StubToolkit is loaded into VM) > assertTrue(tk instanceof StubToolkit); could we just create a method in Util instead of dragging multi-line construct across the tests? e.g. `Util.loadStubToolkit()` ? ------------- PR: https://git.openjdk.org/jfx/pull/959