RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v13]
Alexey Ivanov
aivanov at openjdk.java.net
Mon May 9 21:40:54 UTC 2022
On Mon, 9 May 2022 20:42:06 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:
>
> made changes according to comments
Changes requested by aivanov (Reviewer).
test/jdk/java/awt/TitledBorder/TitledBorderTest.java line 102:
> 100: for (Point p : panelLocations) {
> 101: int y = (int) (p.y * scaling) + SIZE.height / 2;
> 102: System.out.println(scaling + " : " + y);
Probably printing of `scale` and `y` can be removed.
test/jdk/java/awt/TitledBorder/TitledBorderTest.java line 109:
> 107: }
> 108:
> 109: private static void checkHorizontalBorder(int y, BufferedImage img, double scaling) throws RuntimeException {
There's no need to declare `RuntimeException` in throws clause. If you prefer to, please wrap the line, it's longer than 100 columns.
test/jdk/java/awt/TitledBorder/TitledBorderTest.java line 149:
> 147: private static void verifyThickness(int x, int thickness, double scaling, String orientation) {
> 148: int expected = (int) Math.floor(scaling);
> 149: if (thickness != expected) throw new RuntimeException("Unexpected " + orientation + " Border thickness.");
Suggestion:
if (thickness != expected) {
throw new RuntimeException("Unexpected " + orientation + " Border thickness.");
}
Please always use braces even for blocks with one statement only.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7449
More information about the client-libs-dev
mailing list