Chain StringBuilder.append() calls

MSAL

String concatenation within calls to StringBuilder.append() causes unnecessary memory allocation, except for concatenations of String literals, which are joined together at compile time. Replaces inefficient concatenations with chained calls to StringBuilder.append(). Using + inside append() defeats the purpose of the StringBuilder, since the concatenation creates a temporary String before appending.

org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls
mod run . --recipe=org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.