RFR: JDK-8299052 : ViewportOverlapping test fails intermittently on Win10 & Win11 [v2]

Harshitha Onkar honkar at openjdk.org
Wed Jun 7 20:48:21 UTC 2023


On Wed, 7 Jun 2023 11:19:38 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Updated
>
> It doesn't feel right this way either. A cleaner approach would be to pass the undecorated file name and add the extension and specify the format inside `captureScreen`. (Passing the same value as a parameter usually produces an IDE warning, which means the parameter is not necessary.)
> 
> 
> captureScreen("Img_5");
> 
> ImageIO.write(
>         robot.createScreenCapture(new Rectangle(0, 0, screenSize.width, screenSize.height)),
>         "png",
>         new File(filename + ".png")
> );

Updated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14289#discussion_r1222136262



More information about the client-libs-dev mailing list