Change StringBuilder and StringBuffer character constructor argument to String
MSALInstantiating a StringBuilder or a StringBuffer with a Character results in the int representation of the character being used for the initial size. This is almost never the developer's intent and silently produces a buffer with an arbitrary capacity instead of the expected initial content.
org. openrewrite. staticanalysis. NewStringBuilderBufferWithCharArgumentmod run . --recipe= org. openrewrite. staticanalysis. NewStringBuilderBufferWithCharArgumentInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.