On Wed, 1 Jul 2026 19:20:54 GMT, Andy Goryachev <[email protected]> wrote:

>> Martin Fox has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Quick fix for a javadoc issue.
>
> modules/javafx.controls/src/main/java/javafx/scene/control/MenuBar.java line 
> 217:
> 
>> 215:     private static SimpleObjectProperty<ObservableList<Menu>> 
>> commonSystemMenus;
>> 216:     public static final void setCommonSystemMenus(ObservableList<Menu> 
>> value) {
>> 217:         commonSystemMenusProperty().setValue(value);
> 
> what is the use case for this?
> 
> would it make more sense to change to `final commonSystemMenus` and disallow 
> setting the list instance?  the application can just `setAll()`.

At one point I distinguished between a `null` value and an empty list. The 
`null` value reverted to the old behavior (the built-in application menu) and 
an empty list removed the application menu entirely. I got rid of that 
distinction at some point; now an empty list and a `null` both cause the 
built-in application menu to appear. A call that returns an observable list 
would better match how other JavaFX API's work so I'm open to changing over to 
that style.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3509639907

Reply via email to