RFR: 8342098: Write a test to compare the images [v3]
Naveen Narayanan
duke at openjdk.org
Wed Oct 23 15:32:23 UTC 2024
On Mon, 21 Oct 2024 04:25:49 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> Naveen Narayanan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8342098: Updated review comments
>
> test/jdk/java/awt/Robot/ScreenCaptureRobotTest.java line 111:
>
>> 109:
>> 110: private static boolean compareImages(BufferedImage capturedImg,
>> 111: BufferedImage realImg) {
>
> `realImg` is a class variable, not required to pass as an argument.
@kumarabhi006
We are keeping `realImage` as a static variable with global scope
since its used in inner class & other methods.
A method signature `compareImages(img1, img2)`
may be looking meaningful since the intend is for comparing 2 images.
For code readability shall we retain `realImg` as a parameter/take it out ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21524#discussion_r1813044119
More information about the client-libs-dev
mailing list