Use short-circuit boolean operators
ProprietaryReplaces a boolean & with && and | with || where both forms provably evaluate the same, adding parentheses where the lower precedence of the new operator would otherwise regroup the expression, so a && b | c becomes a && (b || c). It leaves an expression alone when an operand is of unknown type, when an operand after the first is a Boolean other than Boolean.TRUE, Boolean.FALSE or Boolean.valueOf(..) of a literal, calls a method, assigns or may throw, or when a pattern variable would change scope.
io. moderne. staticanalysis. UseShortCircuitBooleanOperatormod run . --recipe= io. moderne. staticanalysis. UseShortCircuitBooleanOperatorInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.