RFR: 8353446: Open source several AWT Menu tests - Batch 2 [v2]

Tejesh R tr at openjdk.org
Tue Apr 22 03:59:39 UTC 2025


On Fri, 18 Apr 2025 07:51:25 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

>> Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Updated review comments
>>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_8353446
>>  - Open source
>
> test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 47:
> 
>> 45:     public static void main(String[] args) throws Exception {
>> 46:         String INSTRUCTIONS = """
>> 47:                 1. Create many windows by randomly clicking 'Show Menu Test 1,
> 
> Suggestion:
> 
>                 1. Create many windows by randomly clicking 'Show Menu Test 1',

Updated.

> test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 57:
> 
>> 55:                       """;
>> 56:         PassFailJFrame.builder()
>> 57:                 .title("Test Instructions")
> 
> Setting title is redundant. You can remove in all the tests

Updated.

> test/jdk/java/awt/Menu/DestroyMenuTest/DestroyMenuTest.java line 133:
> 
>> 131: 
>> 132:     static class mySimpleCanvas extends Canvas {
>> 133:         public void paint(Graphics g) {
> 
> Please add @Override for overridden methods

Updated.

> test/jdk/java/awt/Menu/DestroyMenuTest/MenuTest.java line 153:
> 
>> 151: 
>> 152: class MyRectCanvas extends Canvas {
>> 153:     public void paint(Graphics g) {
> 
> Add @Override

Updated.

> test/jdk/java/awt/Menu/DestroyMenuTest/MenuTest.java line 165:
> 
>> 163: 
>> 164: class MycircleCanvas extends Canvas {
>> 165:     public void paint(Graphics g) {
> 
> same here

Updated.

> test/jdk/java/awt/Menu/MenuZOrderTest.java line 27:
> 
>> 25:  * @test
>> 26:  * @bug 6267182
>> 27:  * @summary Menu is not visible after showing and disposing a file dialog, XToolkit
> 
> XToolkit ?

Removed.

> test/jdk/java/awt/Menu/MenuZOrderTest.java line 43:
> 
>> 41: public class MenuZOrderTest {
>> 42:     static class Listener implements ActionListener {
>> 43:         public void actionPerformed(ActionEvent e) {
> 
> Add Override

Updated.

> test/jdk/java/awt/Menu/MenuZOrderTest.java line 54:
> 
>> 52:                 1. Choose Menu 1 --> Menu Item 1 several times.
>> 53:                 2. If menu window is shown correctly and each click
>> 54:                    creates new frame - press PASS.",
> 
> Suggestion:
> 
>                    creates new frame - press PASS.

Updated.

> test/jdk/java/awt/Menu/OnFlyRepaintMenuTest.java line 69:
> 
>> 67:         MenuItem menuItem;
>> 68:         MenuItem submenuItem;
>> 69:         CheckboxMenuItem checkMenuItem;
> 
> Can be removed and declared where it is initializing

Updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287113
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287567
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287612
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053288157
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287706
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287845
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287906
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053287951
PR Review Comment: https://git.openjdk.org/jdk/pull/24681#discussion_r2053288004


More information about the client-libs-dev mailing list