On Thu, 29 Feb 2024 12:12:01 GMT, John Hendrikx <[email protected]> wrote:
>> Karthik P K has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Review comments
>
> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 1031:
>
>> 1029: if (runs.length != 0) {
>> 1030: textRunStart = findFirstRunStart(runs);
>> 1031: }
>
> Can you rewrite this to be:
>
> int textRunStart = findFirstRunStart();
>
> The `runs` parameter doesn't need to be passed (`findFirstRunStart` can
> access it just as easily), and the length check can be moved inside that
> method as well.
Updated `findFirstRunStart` method. I believe the length test is not really
necessary here because even if the Text node is empty, a run will be created
for it. So did not add length check.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1323#discussion_r1510984490