RFR: 8307105: JFileChooser InvalidPathException when selecting some system folders on Windows [v2]

Damon Nguyen dnguyen at openjdk.org
Wed May 17 16:17:38 UTC 2023


On Wed, 17 May 2023 05:25:42 GMT, Tejesh R <tr at openjdk.org> wrote:

>> test/jdk/javax/swing/JFileChooser/FileChooserIPETest.java line 54:
>> 
>>> 52:             public void run() {
>>> 53:                 initialize();
>>> 54:             }
>> 
>> Does this need to be a "Runnable"? Can't initialize()'s contents just be put into main? I might be missing something
>
> Means you are pointing towards `new Runnable()` within Swing worker thread ? Or you are asking whether `initialize()` has to be in worker thread?

I technically had 2 questions in the last comment.
1. Can't you just put the contents of `initialize()` in place of line 53? It's the only thing being run.
2. Why are we creating a `Runnable` instance instead of just calling `initialize` in main?

And I have another completely separate comment. If you actually need this to be a `Runnable`, I think you can replace this with a lambda function.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13998#discussion_r1196771225



More information about the client-libs-dev mailing list