On Wed, 30 Nov 2022 23:28:02 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java
>>  line 374:
>> 
>>> 372: 
>>> 373:                 // When the parent window looses focus - menu 
>>> selection should be cleared
>>> 374:                 
>>> sceneListenerHelper.addChangeListener(scene.windowProperty(), true, (sr, 
>>> oldw, w) -> {
>> 
>> Suggestion:
>> 
>>                 
>> sceneListenerHelper.addChangeListener(scene.windowProperty(), true, w -> {
>
> my version does not create extra object(s).

Hm, I thought that the number of objects created is the same, either a 
`ChangeListener` is created and then wrapped in `ChLi` or a `Consumer` is 
created and wrapped in `ChLi`.

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

PR: https://git.openjdk.org/jfx/pull/906

Reply via email to