On Wed, 17 May 2023 05:25:42 GMT, Tejesh R <t...@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

Reply via email to