Use isNotBlank() instead of trim().isNotEmpty() on a String
Proprietarytrim().isNotEmpty() allocates a trimmed copy to check whether anything is left. isNotBlank() answers the same question by scanning in place.
org. openrewrite. kotlin. stdlib. UseStringIsNotBlankForTrimIsNotEmpty$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. stdlib. UseStringIsNotBlankForTrimIsNotEmpty$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.