RFR: 8328386: Convert java/awt/FileDialog/FileNameOverrideTest test to main [v3]

Alexander Zvegintsev azvegint at openjdk.org
Tue Mar 19 23:20:22 UTC 2024


On Tue, 19 Mar 2024 20:49:36 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> Convert applet based test to a main based test;
>> Move test to an apporpriate location;
>> Remove old files;
>
> Alexander Zuev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Update test/jdk/java/awt/FileDialog/FileNameOverrideTest.java
>    
>    Co-authored-by: Aleksandr Zvegintsev <77687766+azvegint at users.noreply.github.com>
>  - Make test skip if current toolkit is not supported;
>    Make test pass or fail automatically;
>    Correct test instructions accordingly;

Marked as reviewed by azvegint (Reviewer).

test/jdk/java/awt/FileDialog/FileNameOverrideTest.java line 49:

> 47:     private final static String clickDirName = "Directory for double click";
> 48:     private final static String dirPath = System.getProperty("user.dir");;
> 49:     private static JButton showBtn;

Can be local variable

test/jdk/java/awt/FileDialog/FileNameOverrideTest.java line 56:

> 54:         showBtn.addActionListener(w -> {
> 55:             Frame frame = new Frame();
> 56:             fd = new FileDialog(frame, "Open");

Suggestion:

            fd = new FileDialog((Frame) null, "Open");

There is no point in this frame.

test/jdk/java/awt/FileDialog/FileNameOverrideTest.java line 64:

> 62:             frame.dispose();
> 63:             if (fileName.equals(output)) {
> 64:                 PassFailJFrame.forcePass();;

Suggestion:

                PassFailJFrame.forcePass();

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

PR Review: https://git.openjdk.org/jdk/pull/18365#pullrequestreview-1947576728
PR Review Comment: https://git.openjdk.org/jdk/pull/18365#discussion_r1531238886
PR Review Comment: https://git.openjdk.org/jdk/pull/18365#discussion_r1531238333
PR Review Comment: https://git.openjdk.org/jdk/pull/18365#discussion_r1531238119


More information about the client-libs-dev mailing list