Prefer s == null || s.isEmpty()
MSALReplace Guava's Strings.isNullOrEmpty(s) with s == null || s.isEmpty(), and its negation with s != null && !s.isEmpty(). The argument is read twice, so only a variable, a field or a chain of field accesses is converted, and a volatile field is left alone.
org. openrewrite. java. migrate. guava. NoGuavaStringsIsNullOrEmptymod run . --recipe= org. openrewrite. java. migrate. guava. NoGuavaStringsIsNullOrEmptyInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.