RFR: JDK-8314215 Trailing Spaces before Line Breaks Affect the Center Alignment of Text [v12]
John Hendrikx
jhendrikx at openjdk.org
Fri Feb 9 21:44:08 UTC 2024
On Fri, 9 Feb 2024 17:38:16 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Add some clarifying documentation
>> - Do not collapse trailing spaces of last line (where no soft wrap occurs)
>
> tests/system/src/test/java/test/com/sun/javafx/text/TextLayoutTest.java line 62:
>
>> 60: class TestSpan implements TextSpan {
>> 61: String text;
>> 62: Object font;
>
> final text and font?
This is from the original test, I went ahead and converted it to a `record`.
> tests/system/src/test/java/test/com/sun/javafx/text/TextLayoutTest.java line 83:
>
>> 81: int i = 0;
>> 82: while (i < content.length) {
>> 83: spans[i>>1] = new TestSpan(content[i++], content[i++]);
>
> I would seriously recommend adhering to one statement per line here:
>
> Object text = content[i++];
> Object font = content[i++];
> spans[i>>1] = new TestSpan(text, font);
This is not my code, it's from the original test.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1236#discussion_r1484829896
PR Review Comment: https://git.openjdk.org/jfx/pull/1236#discussion_r1484830495
More information about the openjfx-dev
mailing list