Use Collections.singleton(..) for a single recipe tag

MSAL

Replace new HashSet<>(Arrays.asList(tag)) and similar copies of a one-element list, optionally wrapped in Collections.unmodifiableSet(..), with Collections.singleton(tag) for recipe tags. Tags are only read, so the immutable singleton set is safe on Java 8.

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

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