Use StringUtils#isBlank(String)

MSAL

Replace str == null || str.trim().isEmpty() with StringUtils.isBlank(str).

org.openrewrite.java.recipes.UseStringUtilsRecipes$StringUtilsIsBlankRecipe
mod run . --recipe='org.openrewrite.java.recipes.UseStringUtilsRecipes$StringUtilsIsBlankRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.