RFR: 8327492: Remove applet usage and update DisposeInActionEventTest.html [v13]

Alexey Ivanov aivanov at openjdk.org
Thu Mar 7 17:37:55 UTC 2024


On Thu, 7 Mar 2024 17:06:11 GMT, Alisen Chung <achung at openjdk.org> wrote:

>> Root cause of the test failure was fixed with https://bugs.openjdk.org/browse/JDK-8316931, updating this test since the other fix also included a test update.
>
> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - remove trayicon when feiling test
>  - remove automatic check line in instructions

Changes requested by aivanov (Reviewer).

test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 117:

> 115:                     if (systemTray != null) {
> 116:                         systemTray.remove(trayIcon);
> 117:                     }

It is not needed. The icon is always removed, the `finally` block in the `main` method is always executed, even when an exception is thrown.
https://github.com/openjdk/jdk/blob/4bc3afc11a8a88599bc70fc7974b4f0782c60b2c/test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java#L81-L85

If it were needed, you would create a helper method and call it from all the places instead of copying the code around.

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

PR Review: https://git.openjdk.org/jdk/pull/17838#pullrequestreview-1923090600
PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1516558328


More information about the client-libs-dev mailing list