LocalQuickFix (PsiElement psiAnchor, boolean evaluatesToTrue) { if (!(psiAnchor instanceof PsiExpression expr)) return null; boolean negated = false; if (BoolUtils.isNegation(expr)) { expr = BoolUtils.getNegated(expr); negated = true; } if (evaluatesToTrue != negated) return null; if (!(expr instanceof final PsiMethodCallExpression call)) return null; if (!MethodCallUtils.isEqualsCall(call)) return null; PsiExpression arg = ArrayUtil.getFirstElement(call.getArgumentList().getExpressions()); if (!ExpressionUtils.isNullLiteral(arg)) return null; return EqualsToEqualityFix.buildFix(call, negated); }