What problem are you trying to solve?
Similar to the recipe which replaces the StringUtils#isEmpty(String) and StringUtils#isNotEmpty(String) [1], a recipe would be helpful which replaces StringUtils#isBlank(CharSequence) and StringUtils#isNotBlank(CharSequence) with its plain Java equivalent too.
What precondition(s) should be checked before applying this recipe?
At least Java 11 is required due to the availability of java.lang.String#isBlank().
Describe the situation before applying the recipe
class A {
void foo(String bar) {
boolean isBlankBar = StringUtils.isBlank(bar);
boolean isNotBlankBar = StringUtils.isNotBlank(bar);
}
}
Describe the situation after applying the recipe
class A {
void foo(String bar) {
boolean isBlankBar = (bar == null || bar.isBlank());
boolean isNotBlankBar = (bar != null && !bar.isBlank());
}
}