RFR: 8263322: Deadlock when calling Application.launch in the FXThread after Platform.startup [v2]

Florian Kirmaier fkirmaier at openjdk.java.net
Wed Mar 10 17:05:08 UTC 2021


On Wed, 10 Mar 2021 16:01:42 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

>> tests/system/src/test/java/test/javafx/scene/InitializeJavaFXTest.java line 65:
>> 
>>> 63:             } catch (Exception e) {
>>> 64:                 System.out.println("got exception:  " + e);
>>> 65:                 e.printStackTrace();
>> 
>> You should rethrow the exception in this case, since it indicates an unexpected error. Better still, you can remove this block and not catch the Exception in the first place.
>
> If I would rethrow it, it would just print it out, it's currently doing. I could save the Exception in a variable, to rethrow it from the other thread, but I think that would be unnecessarily complicated.

Not relevant anymore, because of Util.runAndWait()

>> 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?

It's now used because i added more test cases.

-------------

PR: https://git.openjdk.java.net/jfx/pull/421


More information about the openjfx-dev mailing list