On Wed, 1 Jul 2026 23:46:15 GMT, Martin Fox <[email protected]> wrote:
>> 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.
Is a no-menu case a valid one? I mean, is this something we should be able to
do for completeness sake, or it totally makes no sense?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1881#discussion_r3513819051