Find Collections.unmodifiableList/Set/Map(...) wrappers

Proprietary

Collections.unmodifiableList(x) wraps a collection in a view that throws on mutation. Kotlin's x.toList()/x.toSet()/x.toMap() produce a fresh immutable copy — safer in concurrent contexts and removes the runtime wrapper.

org.openrewrite.kotlin.interop.FindJavaUtilCollectionsUnmodifiable$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.interop.FindJavaUtilCollectionsUnmodifiable$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.