Avoid boxed boolean expressions

MSAL

Under certain conditions the java.lang.Boolean type is used as an expression, and it may throw a NullPointerException if the value is null. Using Boolean.TRUE.equals(...) guards against unboxing a null reference in control flow positions like if conditions and ternary operators.

org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions
mod run . --recipe=org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions

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