On Wed, 24 May 2023 19:31:07 GMT, Alexey Ivanov <aiva...@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