On Tue, 24 May 2022 11:20:36 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> **WTrayIconPeer**: removed duplicate call to `popupParent.dispose()` that >> might cause NPE (it looks `popupParent` cannot be `null`); organised imports. >> >> **SystemTray**: removed redundant initialisers; replaced sized array with >> empty array in `toArray` call; dropped `newValue != null` chained with >> `equals`. > > Alexey Ivanov has updated the pull request incrementally with three > additional commits since the last revision: > > - toArray: new TrayIcon[0] -> EMPTY_TRAY_ARRAY - use existing empty array > - Drop explicit type argument > - Make popupParent final @aivanov-jdk In SystemTray.java the following line can be simplified using method reference or lambda expression. https://github.com/openjdk/jdk/blob/a2f8c9523438ca63380b0b7d4909d5e5e7fbf88a/src/java.desktop/share/classes/java/awt/SystemTray.java#L135 @aivanov-jdk In SystemTray.java the following line can be simplified using method reference or lambda expression. https://github.com/openjdk/jdk/blob/a2f8c9523438ca63380b0b7d4909d5e5e7fbf88a/src/java.desktop/share/classes/java/awt/SystemTray.java#L135 ------------- PR: https://git.openjdk.java.net/jdk/pull/8850