On Tue, 8 Nov 2022 08:57:54 GMT, Naveen Narayanan <d...@openjdk.org> wrote:

> Colocate JMenuItemSetAcceleratorTest to a regression test.
> 
> This testcase will
> 1) Verify setAccelerator method of JMenuitem.
> 2) Check that the selection of a menu item in the menu bar will generate 
> action by a key combination of META+M.
> 
> Testing:
> Tested using Mach5(20 times per platform) in Mac OS, Linux and Windows and 
> got all pass.

test/jdk/java/awt/Desktop/JMenuItemSetAcceleratorTest.java line 58:

> 56:             }
> 57: 
> 58:             actionPerformLatch = new CountDownLatch(1);

You can create the instance as part of the declaration.

test/jdk/java/awt/Desktop/JMenuItemSetAcceleratorTest.java line 86:

> 84:         if (frame != null) {
> 85:             frame.dispose();
> 86:             frame = null;

This statement does not harm but you can remove it.

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

PR: https://git.openjdk.org/jdk/pull/11035

Reply via email to