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

Alexey Ivanov aivanov at openjdk.org
Thu Mar 7 15:10:59 UTC 2024


On Wed, 6 Mar 2024 20:47:53 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   implemented changes from feedback
>
> test/jdk/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.java line 84:
> 
>> 82:         } finally {
>> 83:             systemTray.remove(trayIcon);
>> 84:         }
> 
> @alisenchung I missed adding null check here earlier. It is good to have this safety check to avoid NPE.
> 
> Suggestion:
> 
>         } finally {
>             if (systemTray != null) {
>                systemTray.remove(trayIcon);
>             }
>          }

`SystemTray.getSystemTray()` can't return `null`. However, the static field `systemTray` can remain `null` in the test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17838#discussion_r1516326933


More information about the client-libs-dev mailing list