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

Kevin Rushforth kcr at openjdk.java.net
Fri Mar 12 16:32:10 UTC 2021


On Fri, 12 Mar 2021 14:27:44 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:

>> tests/system/src/test/java/test/com/sun/javafx/application/InitializeJavaFXBase.java line 96:
>> 
>>> 94:         } catch (Exception e) {
>>> 95:             throw e;
>>> 96:         }
>> 
>> line 91: is non reachable code and second catch block is note required.
>
> Line 91 is reachable. Application.launch throws an IllegalStateException, even so, it doesn't declare it.
> I've Removed the second catch block.

At the time Ambarish made the comment, line 91 referred to this statement:

             throw new Exception();

This is indeed not reachable (although the compiler can't tell that), since `Assert.fail` unconditionally throws an `AssertionError`

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

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


More information about the openjfx-dev mailing list