Chain StringBuilder.append() calls
MSALString 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. ChainStringBuilderAppendCallsmod run . --recipe= org. openrewrite. staticanalysis. ChainStringBuilderAppendCallsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.