RFR: 8316518 javafx.print.Paper getWidth / getHeight rounds values, causing errors. [v2]
Florian Kirmaier
fkirmaier at openjdk.org
Tue Oct 31 11:59:45 UTC 2023
On Thu, 26 Oct 2023 01:51:52 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> JDK-8316518
>> small change based on codereview
>
> modules/javafx.graphics/src/main/java/javafx/print/Paper.java line 85:
>
>> 83: case MM : return (dim * 72) / 25.4;
>> 84: }
>> 85: return dim;
>
> Minor: you can use an enhanced `switch` expression here, which also ensures exhaustiveness:
>
> return switch (units) {
> case POINT -> dim;
> case INCH -> dim * 72;
> case MM -> (dim * 72) / 25.4;
> };
done
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1244#discussion_r1377475424
More information about the openjfx-dev
mailing list