Use String.toInt() instead of Integer.parseInt(s)

Proprietary

Java-idiom Integer.parseInt(s) migrates to the Kotlin extension s.toInt(). The behavior is identical — both throw NumberFormatException on invalid input.

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