On Fri, 31 May 2024 04:39:24 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

>> test/jdk/com/sun/java/swing/plaf/gtk/bug6492108.java line 136:
>> 
>>> 134:                 if (refimg.getWidth() != testimg.getWidth() ||
>>> 135:                     refimg.getHeight() != testimg.getHeight())
>>> 136:                 {
>> 
>> move bracket to previous line to be consistent
>
> Initially I thought of doing so but in one of the PR it was mentioned that 
> "We generally prefer the { on a new line if the conditional is multi-line" 
> https://github.com/openjdk/jdk/pull/18703#discussion_r1571126135.
> 
> So I left like that.

I can't say that “We generally prefer the { on a new line if the conditional is 
multi-line” really holds, yet I agree it makes code less confusing by 
separating the condition and its continuation lines from the inside block.

To make the continuation line stand out as continuation line, place the `||` at 
the start of wrapped line.

Again, there's no agreed upon set of style guidelines.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19381#discussion_r1622939563

Reply via email to