Avoid boxed boolean expressions
MSALUnder 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. AvoidBoxedBooleanExpressionsmod run . --recipe= org. openrewrite. staticanalysis. AvoidBoxedBooleanExpressionsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.