RFR: 8328158: Convert java/awt/Choice/NonFocusablePopupMenuTest to automatic main test [v2]

Abhishek Kumar abhiscxk at openjdk.org
Thu Mar 14 16:07:46 UTC 2024


On Thu, 14 Mar 2024 13:00:06 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Convert test to the automatic main and move it from its own folder since it is no longer required.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Minor fixes

test/jdk/java/awt/Choice/NonFocusablePopupMenuTest.java line 46:

> 44:     volatile Point pos;
> 45:     volatile Dimension size;
> 46:     volatile int selection1, selection2;

May add a blank line after this.

test/jdk/java/awt/Choice/NonFocusablePopupMenuTest.java line 59:

> 57:             choice.setFocusable(false);
> 58:             this.add(choice);
> 59:             this.setLayout (new FlowLayout());

Suggestion:

            this.setLayout(new FlowLayout());

test/jdk/java/awt/Choice/NonFocusablePopupMenuTest.java line 60:

> 58:             this.add(choice);
> 59:             this.setLayout (new FlowLayout());
> 60:             setSize (200,200);

Suggestion:

            setSize (200, 200);

test/jdk/java/awt/Choice/NonFocusablePopupMenuTest.java line 70:

> 68:         });
> 69:         EventQueue.invokeAndWait(() -> {
> 70:             selection1 = choice.getSelectedIndex();

May be moved inside the EventQueue above.

test/jdk/java/awt/Choice/NonFocusablePopupMenuTest.java line 85:

> 83:         });
> 84:         EventQueue.invokeAndWait(() -> {
> 85:             setVisible(false);

I think this also can be moved inside above EventQueue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18300#discussion_r1525130997
PR Review Comment: https://git.openjdk.org/jdk/pull/18300#discussion_r1525131265
PR Review Comment: https://git.openjdk.org/jdk/pull/18300#discussion_r1525131484
PR Review Comment: https://git.openjdk.org/jdk/pull/18300#discussion_r1525134150
PR Review Comment: https://git.openjdk.org/jdk/pull/18300#discussion_r1525136979


More information about the client-libs-dev mailing list