On Wed, 17 Sep 2025 06:40:05 GMT, Damon Nguyen <[email protected]> wrote:

>> src/java.desktop/share/classes/java/awt/Robot.java line 129:
>> 
>>> 127:     private DirectColorModel screenCapCM = null;
>>> 128: 
>>> 129:     /**
>> 
>> many new lines still longer than 80 chars.
>
> I tried to follow a similar structure to the rest of the class. Some may be 
> longer due to formatting links but I thought the result when generating the 
> html looked fine. Was there any specific issue with the lines that are still 
> longer than 80 chars?

The main reason for the 80 characters limit is to eliminate need to 
horizontally scroll sources - especially when viewing git history and diffs in 
terminals. Once it was a part of the Sun (and then Oracle) Java Coding 
Conventions (JCC 4.1 to be precise). But that document is outdated and no 
longer maintained so i do not think we need to enforce it - at least when the 
line length is in reasonable. Personally i would not mind if the string 
(especially comments with JavaDoc formatting) if shorter than 120 chars. Longer 
than 120 is still very hard to read even on the modern high resolution displays 
- the side by side comparison of the diff with such a line would span across 
more than 240 characters and that is just hard to read which makes it easier to 
miss an unintended diff beyond the horizontal border.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26969#discussion_r2467130485

Reply via email to