void (@NotNull PsiAssignmentExpression assignment) { super.visitAssignmentExpression(assignment); final IElementType assignmentTokenType = assignment.getOperationTokenType(); if (!assignmentTokenType.equals(JavaTokenType.EQ)) { return; } final PsiExpression lhs = assignment.getLExpression(); PsiExpression rhs = PsiUtil.skipParenthesizedExprDown(assignment.getRExpression()); if (rhs instanceof PsiTypeCastExpression typeCastExpression) { final PsiType castType = typeCastExpression.getType(); if (castType == null || !castType.equals(lhs.getType())) { return; } rhs = PsiUtil.skipParenthesizedExprDown(typeCastExpression.getOperand()); } if (!(rhs instanceof PsiPolyadicExpression polyadicExpression)) { return; } final PsiExpression[] operands = polyadicExpression.getOperands(); if (operands.length < 2) { return; } if (operands.length > 2 && !ParenthesesUtils.isAssociativeOperation(polyadicExpression)) { return; } for (PsiExpression operand : operands) { if (operand == null) { return; } } final IElementType expressionTokenType = polyadicExpression.getOperationTokenType(); if (JavaTokenType.EQEQ.equals(expressionTokenType) || JavaTokenType.NE.equals(expressionTokenType)) { return; } if (ignoreLazyOperators) { if (JavaTokenType.ANDAND.equals(expressionTokenType) || JavaTokenType.OROR.equals(expressionTokenType)) { return; } } if (ignoreObscureOperators) { if (JavaTokenType.XOR.equals(expressionTokenType) || JavaTokenType.PERC.equals(expressionTokenType)) { return; } } if (!EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(lhs, operands[0])) { return; } registerError(assignment, lhs, polyadicExpression); }