RFR: 4138921: TextLayout handling of empty strings
Phil Race
prr at openjdk.org
Wed Sep 3 17:42:44 UTC 2025
On Wed, 3 Sep 2025 13:57:41 GMT, Daniel Gredler <dgredler at openjdk.org> wrote:
>> src/java.desktop/share/classes/java/awt/font/TextLayout.java line 516:
>>
>>> 514:
>>> 515: int start = text.getBeginIndex();
>>> 516: int limit = text.getEndIndex();
>>
>> Why do we call text.first() twice, on line 516 and in the loop init block?
>
> I'm not sure, I don't think it's necessary. The code has been this way since the first public commit, so there is no hint in the public git history. Should I remove it?
Looks to me like it can be safely removed (the one on line 516/518)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26947#discussion_r2319714886
More information about the client-libs-dev
mailing list