On Mon, 4 Mar 2024 16:15:02 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> Karthik P K has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Add unit test
>
> 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`.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1323#discussion_r1511503440

Reply via email to