Use String.toInt() instead of Integer.parseInt(s)
ProprietaryJava-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$KtRecipemod 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.