RFR: 8359598: [TestBug] VirtualFlowTestUtils should not create a temporary Stage
Andy Goryachev
angorya at openjdk.org
Thu Jul 10 19:46:45 UTC 2025
On Wed, 18 Jun 2025 10:43:38 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
>> modules/javafx.controls/src/test/java/test/com/sun/javafx/scene/control/infrastructure/VirtualFlowTestUtils.java line 349:
>>
>>> 347: flow = (VirtualFlow<?>)control.lookup("#virtual-flow");
>>> 348:
>>> 349: if (sl != null) {
>>
>> should we have a check here with a helpful message (which recommends to use `StageLoader`), instead of returning `null`?
>
> I thought about this as well. No strong opinion from my side.
there should be no noise: it's more of a question of instructing the developer why their test failed. if there is no message, the NPE will happen in the context of the failing test which makes it rather obvious. I agree with @Maran23 , either way is fine.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1829#discussion_r2198570177
More information about the openjfx-dev
mailing list