On Mon, 4 Mar 2024 17:13:01 GMT, John Hendrikx <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 1044:
>>
>>> 1042: private int findFirstRunStart() {
>>> 1043: int start = Integer.MAX_VALUE;
>>> 1044: for (GlyphList r: getRuns()) {
>>
>> the old code had a 0 check for getRuns.length, presumably to avoid the
>> iterator creation.
>> the new code is probably fine, because most of the time we'll have the need
>> for the iterator anyway.
>
> `getRuns` returns an array, it won't create an `Iterator`.
you are right!
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1323#discussion_r1511547919