RFR: 8237505: RadioMenuItem in ToggleGroup: deselected on accelerator [v2]

Karthik P K kpk at openjdk.org
Mon Jan 23 08:24:23 UTC 2023


On Sat, 21 Jan 2023 22:58:02 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ControlAcceleratorSupport.java line 178:
>> 
>>> 176:                         if (!menuitem.isDisable()) {
>>> 177:                             if (menuitem instanceof RadioMenuItem) {
>>> 178:                                 if(((RadioMenuItem)menuitem).getToggleGroup() == null){
>> 
>> minor: this group insists on adding spaces after "if" and before "{"
>
> You can use a pattern variable here to get rid of all the casts.

Updated the code to address above comments

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

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


More information about the openjfx-dev mailing list