On Mon, 30 Aug 2021 13:29:56 GMT, Сергей Цыпанов
<[email protected]> wrote:
>> Claes Redestad has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Simplify and call getBytes(String, int, byte) when possible
>
> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1730:
>
>> 1728: }
>> 1729:
>> 1730: private void putStringAt(int index, String str) {
>
> Can we replace all the calls to this method with calls to previous method as
> `putStringAt(index, str, 0, str.length())` taking into account that in all
> usecases `str.length()` is already calculated into a local var?
No, I don't think so. The only use of this I can find is at line 1298 which
effectively adds a substring: `putStringAt(dstOffset, (String) s, start, end);`
-------------
PR: https://git.openjdk.java.net/jdk/pull/5291