On Fri, 27 May 2022 20:48:30 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 one additional > commit since the last revision: > > Use method reference in setSystemTrayAccessor instead of anonymous class Marked as reviewed by prr (Reviewer). > If method reference is used, the code becomes much shorter: > > ```java > AWTAccessor.setSystemTrayAccessor(SystemTray::firePropertyChange); > ``` > > What do others think? I am sure this code pre-dates method references, but if updating something then using method references is perfectly OK. ------------- PR: https://git.openjdk.java.net/jdk/pull/8850