On Wed, 23 Nov 2022 23:09:55 GMT, John Hendrikx <[email protected]> wrote:
>>> As for this PR, I don't mind leaving it as is or reverting these changes. I
>>> don't think that a CCE is realistic here.
>>
>> I agree that this isn't a good test design. I was just pointing out why it
>> isn't (in theory) a completely compatible change. I don't really mind one
>> way or the other here.
>
> 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);
-------------
PR: https://git.openjdk.org/jfx/pull/959