void (@NotNull PsiPolyadicExpression expression) { super.visitPolyadicExpression(expression); if (!arithmeticTokens.contains(expression.getOperationTokenType())) { return; } if (ExpressionUtils.hasStringType(expression) || PsiUtilCore.hasErrorElementChild(expression)) { return; } final PsiExpression[] operands = expression.getOperands(); final IElementType tokenType = expression.getOperationTokenType(); final boolean isPointless; final PsiType expressionType = expression.getType(); if (expressionType == null) return; if (PsiTypes.doubleType().equals(expressionType) || PsiTypes.floatType().equals(expressionType)) { isPointless = floatingPointOperationIsPointless(tokenType, operands); } else if (tokenType.equals(JavaTokenType.PLUS)) { isPointless = additionExpressionIsPointless(operands); } else if (tokenType.equals(JavaTokenType.MINUS)) { isPointless = subtractionExpressionIsPointless(operands); } else if (tokenType.equals(JavaTokenType.ASTERISK)) { isPointless = multiplyExpressionIsPointless(operands); } else if (tokenType.equals(JavaTokenType.DIV) || tokenType.equals(JavaTokenType.PERC)) { isPointless = divideExpressionIsPointless(operands); } else { isPointless = false; } if (!isPointless) { return; } registerError(expression, expression); }