On Tue, 1 Oct 2024 16:31:39 GMT, Phil Race <p...@openjdk.org> wrote: > Open source several AWT tests, mostly related to menu short cuts.
test/jdk/java/awt/MenuShortcut/ActionCommandTest.java line 53: > 51: static volatile Menu m; > 52: static volatile MenuBar mb; > 53: static volatile MenuItem mi; All these 3 can be local vars test/jdk/java/awt/MenuShortcut/FunctionKeyShortcut.java line 51: > 49: static volatile Menu m; > 50: static volatile MenuBar mb; > 51: static volatile MenuItem mi1, mi2, mi3, mi4, mi5, mi6, mi7, mi8, mi9; All these 3 line class vars can be local vars in createUI test/jdk/java/awt/MenuShortcut/FunctionKeyShortcut.java line 55: > 53: static volatile boolean event = false; > 54: static volatile boolean failed = false; > 55: static final String ITEMTEXT = "Testitem"; No use of this..can be removed.. test/jdk/java/awt/MenuShortcut/MenuItemShortcutReplaceTest.java line 105: > 103: ms = new MenuShortcut(KeyEvent.VK_C); > 104: mi.setShortcut(ms); > 105: PassFailJFrame.log("Shortcut key set to "+shortcut+"C"); indentation test/jdk/java/awt/MenuShortcut/MenuItemShortcutReplaceTest.java line 105: > 103: ms = new MenuShortcut(KeyEvent.VK_C); > 104: mi.setShortcut(ms); > 105: PassFailJFrame.log("Shortcut key set to "+shortcut+"C"); indentation test/jdk/java/awt/MenuShortcut/MenuItemShortcutReplaceTest.java line 108: > 106: } > 107: if (e.getSource() == mi) { > 108: PassFailJFrame.log("MenuItem Selected"); indentation ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21291#discussion_r1783189101 PR Review Comment: https://git.openjdk.org/jdk/pull/21291#discussion_r1783190348 PR Review Comment: https://git.openjdk.org/jdk/pull/21291#discussion_r1783190758 PR Review Comment: https://git.openjdk.org/jdk/pull/21291#discussion_r1783192737 PR Review Comment: https://git.openjdk.org/jdk/pull/21291#discussion_r1783193437 PR Review Comment: https://git.openjdk.org/jdk/pull/21291#discussion_r1783193494