On Thu, 20 Aug 2026 17:08:54 GMT, eduardsdv <[email protected]> wrote:
>> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/LabelSkinTest.java
>> line 97:
>>
>>> 95: public void teardown() {
>>> 96: if (stageLoader != null) {
>>> 97: stageLoader.dispose();
>>
>> `stageLoader = null;`
>>
>> to avoid using stale stageLoader left over from an earlier run?
>
> As far as I know, it is not necessary, because the Junit creates a new
> instance of the test class for each test method call.
This may or may not be true, as it depends on junit5 configuration
junit.jupiter.testinstance.lifecycle.default = per_class
there is no harm in adhering to good coding practices
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2253#discussion_r3833048110