Find java.util.Collections / Arrays factory usage inside Kotlin
ProprietaryArrays.asList, Collections.emptyList, Collections.singletonList, and Collections.unmodifiableList (plus Set/Map siblings) all have idiomatic Kotlin stdlib replacements — listOf, emptyList<T>(), setOf, mapOf, and .toList()/.toSet()/.toMap() for immutable copies.
org. openrewrite. kotlin. interop. FindJavaUtilCollectionsFriction$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. interop. FindJavaUtilCollectionsFriction$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.