On Wed, 10 Mar 2021 13:14:15 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Fixing deadlock when calling Application.launch in the FXThread after >> Platform.startup > > tests/system/src/test/java/test/javafx/scene/InitializeJavaFXTest.java line > 24: > >> 22: } >> 23: >> 24: public static void initializeApplication() throws Exception { > > This method is unused, along with the `InitializeApp` class. Did you plan to > use it? It's useful to compare it with the behavior of the two methods to start JavaFX. If it would be my codebase, I would keep it, so if someone investigates it later, it's easier to investigate for differences. But I can also delete it, what would you prefer? > modules/javafx.graphics/src/main/java/com/sun/javafx/application/LauncherImpl.java > line 174: > >> 172: final String[] args) { >> 173: >> 174: if (com.sun.glass.ui.Application.isEventThread() || >> launchCalled.getAndSet(true)) { > > Can you do this as two separate `if` checks, with the `isEventThread` check > first? The error message for this case should be something like "Application > launch must not be called on the JavaFX Application Thread". done > tests/system/src/test/java/test/javafx/scene/InitializeJavaFXTest.java line 1: > >> 1: package test.javafx.scene; > > 1. Missing Copyright header block > 2. Other platform startup tests are in `test.com.sun.javafx.application`; can > you move this test there as well? done ------------- PR: https://git.openjdk.java.net/jfx/pull/421