On Sat, 19 Feb 2022 08:09:32 GMT, Manukumar V S <m...@openjdk.org> wrote:

>> Create a regression test for 
>> [JDK-4618767](https://bugs.openjdk.java.net/browse/JDK-4618767)
>> 
>> Issue identified in 
>> [JDK-4618767](https://bugs.openjdk.java.net/browse/JDK-4618767):
>> Typing a letter while a JList has focus now makes the selection jump to the 
>> first/next node/item whose text starts with that letter even though that 
>> letter is accompanied by modifier keys such as ALT or CTRL.
>> 
>> Fix:
>> Only enable JList letter navigation when the user
>> doesn't press any modifier keys such as ALT or CTRL.
>> 
>> Testing:
>> I have verified this test with JDK 1.4.0 and JDK 1.4.1 .
>> The issue is reproducible using the test with JDK 1.4.0 , where the bug was 
>> originally reported and the test passed in JDK 1.4.1 where the issue was 
>> fixed.
>> I have tested it in Mac and Windows platforms multiple times and it passed 
>> everywhere.
>
> Manukumar V S has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Review comments fixed: A CountDownLatch used instead of polling loop, 
> hitKeys() introduced for key press/release, variable MENU changed to 
> FILE_MENU, formatting changes, 
> frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)

Looks good overall except for the two comments.

test/jdk/javax/swing/JList/4618767/JListSelectedElementTest.java line 54:

> 52:  * @bug 4618767
> 53:  * @summary Typing a letter while a JList has focus now makes the 
> selection jump to the item whose text
> 54:  *          starts with that letter even though that letter is 
> accompanied by modifier keys such as ALT or CTRL.

I believe the test confirms the opposite.

test/jdk/javax/swing/JList/4618767/JListSelectedElementTest.java line 118:

> 116: 
> 117:                 // Now operate Menu using Mnemonics, different key 
> combinations for different OS.
> 118:                 // For most of the OS its ALT+F, except for non Nimbus 
> LnFs in Mac where it is ALT+CNTRL+F.

Suggestion:

                // Now operate Menu using Mnemonics, different key combinations 
for different OSes.
                // For most OSes it's ALT+F; on macOS it's ALT+CNTRL+F except 
for Nimbus LaF.

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

PR: https://git.openjdk.java.net/jdk/pull/7496

Reply via email to