RFR: JDK-8015739: Background of JInternalFrame is located out of JInternalFrame [v5]

Alexey Ivanov aivanov at openjdk.org
Tue Oct 4 20:01:28 UTC 2022


On Tue, 4 Oct 2022 19:37:32 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review changes, saving a scaled version of image
>
> test/jdk/javax/swing/JInternalFrame/InternalFrameBorderTest.java line 185:
> 
>> 183:                 errorLog.append("At uiScale: "+ uiScale +
>> 184:                 ", Red background color detected at "
>> 185:                 + borderDirection + " border\n");
> 
> This doesn't look right either. The old code had only the body of `if` incorrectly indented.
> 
> 
>             if (Color.RED.equals(robot.getPixelColor(
>                     isVertical ? i : (iFrameLoc.x + MIDPOINT),
>                     isHorizontal ? i : (iFrameLoc.y + MIDPOINT)))) {
>                 saveScreenCapture(borderDirection + "_" + uiScale + ".png");
>                 errorLog.append("uiScale: " + uiScale
>                         + " Red background color detected at "
>                         + borderDirection + " border\n");
> 
> 
> Continuation lines are indented twice as much or to align with a level they're wrapped at. The example for the second case:
> 
>                 errorLog.append("uiScale: " + uiScale
>                                 + " Red background color detected at "
>                                 + borderDirection + " border\n");
> 
> Here, the operators on the wrapped lines align to the following column of the opening parenthesis for parameters of `append`.

In my example, I put the operators on the continuation line, it's what Java Coding Style recommends. However, leaving the operators on the previous line is very common.

Here, you're mixing two styles: the first continuation line with `append` parameter had `+` at the end of the line, but the second line wrapped the `+` operator to the next line.

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

PR: https://git.openjdk.org/jdk/pull/10274



More information about the client-libs-dev mailing list