Use var for reference-typed variables

MSAL

Try to apply local variable type inference var to variables containing Objects where possible. This recipe will not touch variable declarations with generics or initializers containing ternary operators.

org.openrewrite.java.migrate.lang.var.UseVarForObject
mod run . --recipe=org.openrewrite.java.migrate.lang.var.UseVarForObject

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