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

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Mar 12 02:49:25 UTC 2024


On Mon, 11 Mar 2024 14:52:04 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   typo
>
> test/jdk/javax/swing/JFileChooser/6798062/bug6798062.java line 78:
> 
>> 76: 
>> 77:     public static void main(String[] args) throws Exception {
>> 78:          PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
> 
> Please use the `builder` helper method instead of `new`.

Updated...

> test/jdk/javax/swing/JFileChooser/6798062/bug6798062.java line 86:
> 
>> 84:                 .build();
>> 85: 
>> 86:         SwingUtilities.invokeAndWait(() -> {
> 
> I suggest using the `testUI` method of the builder which accepts a lambda expression that returns a frame. Calling the passed method reference or lambda expression on EDT, registering the frame with `PassFailJFrame` and its positioning is handled automatically.

ok..updated...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18180#discussion_r1520765177
PR Review Comment: https://git.openjdk.org/jdk/pull/18180#discussion_r1520765007


More information about the client-libs-dev mailing list