On Wed, 15 Mar 2023 20:01:05 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
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
>   
>   Removed other allocations of StringBuilder when processing named groups in 
> replacement string.

Sorry for the delay.
The workaround for appending to StringBuffer/StringBuilder is awkward, adding a 
try/catch that can't happen.  But I don't have a better suggestion. 
It is scoped to the appendExpandedReplacement method and has no runtime impact.

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

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/13048#pullrequestreview-1361610772

Reply via email to