On Mon, 21 Oct 2024 13:39:00 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> test/jdk/java/awt/Robot/ScreenCaptureRobotTest.java line 125: >> >>> 123: capturedPixel = capturedImg.getRGB(i, j); >>> 124: realPixel = realImg.getRGB(i, j); >>> 125: if (capturedPixel != realPixel) { >> >> To optimize further, `capturedImg.getRGB(i, j)` and `realImg.getRGB(i, j)` >> can be directly evaluated inside if condition. > > Yet, you'll be unable to print values unless you use `getRGB` again. Yeah, if it is required to print values then good to save them. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21524#discussion_r1809059336