RFR: 8294535 : Add screen capture functionality to PassFailJFrame

Harshitha Onkar honkar at openjdk.org
Fri May 26 18:59:00 UTC 2023


On Wed, 24 May 2023 19:31:07 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> 1) Used builder pattern 
>> 2) Tested AWT tests and it passed
>
> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 306:
> 
>> 304:                     .forEach(PassFailJFrame::captureScreen);
>> 305:         }
>> 306: 
> 
> Maybe use `switch` statement with a `default` case which throws an exception rather than shows success message. (`if else if else` will also do.)
> 
> Yeah, it's a private method yet it's better to handle an unexpected value.

I agree switch statement could be used here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14094#discussion_r1207195923



More information about the client-libs-dev mailing list