On Fri, 29 Mar 2024 07:15:42 GMT, Alisen Chung <ach...@openjdk.org> wrote:

>> Removing applet usage from manual JFileChooser tests
>
> Alisen Chung has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   added headful tag, remove pass boolean var and directly evaluate pass 
> condition

test/jdk/javax/swing/JFileChooser/4150029/bug4150029.java line 52:

> 50:     private static Robot robot;
> 51:     private static File testDir;
> 52:     private static File subDir;

`testDir` can be declared as local variable.
Probably `subDir` also can be moved as local variable provided you create 
JFileChooser instance with default directory and then set current directory 
inside main method after createAndShowUI method call.

something like this..

`SwingUtilities.invokeAndWait(() -> {
                createAndShowUI();
                fileChooser.setCurrentDirectory(subDir);
            });`

test/jdk/javax/swing/JFileChooser/4150029/bug4150029.java line 117:

> 115:         SwingUtilities.invokeAndWait(() -> {
> 116:             p = frame.getLocationOnScreen();
> 117: 

May remove extra blank line.

test/jdk/javax/swing/JFileChooser/4150029/bug4150029.java line 128:

> 126:         clickBackSpace();
> 127: 
> 128:         if (!(prevDir != crntDir)) {

simplified condition - 
Suggestion:

        if (prevDir == crntDir) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18415#discussion_r1544203362
PR Review Comment: https://git.openjdk.org/jdk/pull/18415#discussion_r1544213542
PR Review Comment: https://git.openjdk.org/jdk/pull/18415#discussion_r1544212323

Reply via email to