Prefer Predicate.not(..) over casting to Predicate and calling negate()
MSALReplace ((Predicate<T>) lambdaOrMethodRef).negate() with Predicate.not(lambdaOrMethodRef) as of Java 11.
org. openrewrite. java. migrate. util. UsePredicateNotmod run . --recipe= org. openrewrite. java. migrate. util. UsePredicateNotInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.