RFR: 8291598: Matcher.appendReplacement should not create new StringBuilder instances [v2]
Raffaello Giulietti
rgiulietti at openjdk.org
Wed Mar 15 20:01:10 UTC 2023
On Wed, 15 Mar 2023 18:55:35 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8291598: Matcher.appendReplacement should not create new StringBuilder instances
>>
>> Fix copyright year
>
> src/java.base/share/classes/java/util/regex/Matcher.java line 1066:
>
>> 1064: } else {
>> 1065: break;
>> 1066: }
>
> Possibly remove another SB allocation; remember start and end and use `replacement.substring(start, end)`.
Thanks @RogerRiggs, addressed in latest commit.
-------------
PR: https://git.openjdk.org/jdk/pull/13048
More information about the core-libs-dev
mailing list