RFR: 8327748: Convert javax/swing/JFileChooser/6798062/bug6798062.java applet test to main [v4]

Alexey Ivanov aivanov at openjdk.org
Tue Mar 12 11:14:18 UTC 2024


On Tue, 12 Mar 2024 10:54:37 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Conversion of manual applet test to main based using PassFailJFrame manual framework
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   move frame init in createUI

test/jdk/javax/swing/JFileChooser/6798062/bug6798062.java line 108:

> 106: 
> 107:         try {
> 108:             folder = ShellFolder.getShellFolder(new File("."));

I wonder if it was expected that there are files in the directory. Like yes, so I could be wrong. I assumed files were created but no file is created, instead the files in this directory is listed. The expected result is that each file in the directory creates a new `ShellFolder` instance.

test/jdk/javax/swing/JFileChooser/6798062/bug6798062.java line 177:

> 175:     private static void fail(String msg) {
> 176:         PassFailJFrame.forceFail();
> 177:         throw new RuntimeException(msg);

Suggestion:

        PassFailJFrame.forceFail(msg);

`forceFail` will throw the exception on the main thread.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18180#discussion_r1521274628
PR Review Comment: https://git.openjdk.org/jdk/pull/18180#discussion_r1521275324


More information about the client-libs-dev mailing list