RFR: 8342098: Write a test to compare the images [v6]
Naveen Narayanan
duke at openjdk.org
Wed Nov 13 13:18:17 UTC 2024
On Tue, 12 Nov 2024 17:03:43 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> test/jdk/java/awt/Robot/ScreenCaptureRobotTest.java line 70:
>>
>>> 68: realImage = GraphicsEnvironment.getLocalGraphicsEnvironment()
>>> 69: .getDefaultScreenDevice().getDefaultConfiguration()
>>> 70: .createCompatibleImage(IMAGE_WIDTH, IMAGE_HEIGHT);
>>
>> Suggestion:
>>
>> realImage = GraphicsEnvironment.getLocalGraphicsEnvironment()
>> .getDefaultScreenDevice()
>> .getDefaultConfiguration()
>> .createCompatibleImage(IMAGE_WIDTH, IMAGE_HEIGHT);
>>
>> Don't hide a call and wrap at each chained call — it's easier to track what's happening.
>
> What about this suggestion? Do you disagree?
I do agree, This looks more readable.
Just kept it as the finishing changes since
existing code formatter in IDE will auto wrap it again.
This change we do manually & avoid
Java Code Style Formatter.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21524#discussion_r1840234417
More information about the client-libs-dev
mailing list