Recipe classes should not have mutable static fields

MSAL

Add the final keyword to mutable static fields in Recipe classes, unless they are assigned after their declaration, such as a lazily computed cache.

org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes
mod run . --recipe=org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes

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