Find java.util.Optional usage in Kotlin
ProprietaryKotlin already models the absent-value case with the nullable type system (T?). Optional<T> is a JVM-only crutch that's worth keeping at the Java boundary only — converting Kotlin-internal Optional usage to T? improves null-safety and removes one wrapper allocation per call.
org. openrewrite. kotlin. interop. FindOptionalUsage$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. interop. FindOptionalUsage$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.