On Wed, 15 Mar 2023 18:47:09 GMT, Raffaello Giulietti <[email protected]>
wrote:
>> Remove instantiation of `StringBuilder`
>
> 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)`.
-------------
PR: https://git.openjdk.org/jdk/pull/13048