Checkstyle

This commit is contained in:
Clément Fournier committed 2021-08-09 18:28:17 +02:00
1 parent 621f5f6dd1
commit a1486ffe54
1 file changed
+2 -2
@@ -40,12 +40,12 @@ public class SimplifyConditionalRule extends AbstractJavaRulechainRule {
if (isInfixExprWithOperator(node.getParent(), CONDITIONAL_AND)) {
// a != null && a instanceof T
negated = false;
nullCheckExpr = getOtherOperandIfInInfixExpr(node);
nullCheckExpr = getOtherOperandIfInInfixExpr(node);
} else if (isBooleanNegation(node.getParent())
&& isInfixExprWithOperator(node.getParent().getParent(), CONDITIONAL_OR)) {
// a == null || a instanceof T
negated = true;
nullCheckExpr = getOtherOperandIfInInfixExpr(node.getParent());
nullCheckExpr = getOtherOperandIfInInfixExpr(node.getParent());
} else {
return null;
}