Use Collection.max() instead of Collections.max(coll)
Proprietaryjava.util.Collections.max(coll) is JVM-only; Kotlin's Collection.max() extension is multiplatform and reads as a receiver call. Both throw NoSuchElementException on an empty collection.
org. openrewrite. kotlin. migrate. UseCollectionMax$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. migrate. UseCollectionMax$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.