On Tue, 23 Mar 2021 09:49:42 GMT, Ambarish Rapte <[email protected]> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8263402
>> Rewrote the style memoryleak test
>
> tests/system/src/test/java/test/javafx/scene/StyleMemoryLeakTest.java line 59:
>
>> 57: startupLatch.countDown();
>> 58: });
>> 59: assertTrue("Timeout waiting for FX runtime to start",
>> startupLatch.await(15, TimeUnit.SECONDS));
>
> The runnable passed to `Platform.startup()` is executed on JavaFX Application
> thread once it is started. `Platform.setImplicitExit(false);` can be called
> from any thread. So we do not need to pass the runnable and do not need
> CountDownLatch.
> This block can be replaced by,
> Platform.startup(null);
> Platform.setImplicitExit(false);
While this is true, I like the current logic better, since it asserts that the
platform has started, which provides a better error message in case there is a
problem.
-------------
PR: https://git.openjdk.java.net/jfx/pull/424