RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v25]
Alexey Ivanov
aivanov at openjdk.java.net
Wed Jun 8 22:45:43 UTC 2022
On Wed, 8 Jun 2022 22:25:12 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping
>
> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>
> removed rendering hints, changed condition to reapply old transform
src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 158:
> 156: AffineTransform at = new AffineTransform();
> 157: Stroke oldStk = new BasicStroke();
> 158: int stkWidth = 1;
Now the usage of these variables is restricted to the case where `resetTransform` is set to `true`. Therefore, they can be left uninitialised here; a value is assigned before it's used in all the code paths as far as I can see.
It's just a small (premature) optimisation, it avoids creating two objects. I don't insist though.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7449
More information about the client-libs-dev
mailing list