Replace Enum.values() with Enum.entries

Proprietary

Replace calls to Enum.values() with the Enum.entries property. The entries property returns an efficient immutable list instead of creating a new array on each call. Deprecated since Kotlin 1.9, recommended replacement for Kotlin 2.x.

org.openrewrite.kotlin.migrate.ReplaceEnumValuesWithEntries
mod run . --recipe=org.openrewrite.kotlin.migrate.ReplaceEnumValuesWithEntries

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