Unnecessary String#valueOf(..)

MSAL

Replace unnecessary String#valueOf(..) method invocations with the argument directly. This occurs when the argument to String#valueOf(arg) is a string literal, such as String.valueOf("example"). Or, when the String#valueOf(..) invocation is used in a concatenation, such as "example" + String.valueOf("example"). The wrapping call is redundant since Java already performs the conversion implicitly in these contexts.

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

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