void (@NotNull PsiPolyadicExpression expression) { super.visitPolyadicExpression(expression); final IElementType tokenType = expression.getOperationTokenType(); if (!tokenType.equals(JavaTokenType.ASTERISK) && !tokenType.equals(JavaTokenType.LTLT)) { return; } final PsiType type = expression.getType(); if (!isNonLongInteger(type)) { return; } if (hasInnerMultiplication(expression)) { return; } if (insideAssertEquals(expression)) { return; } PsiExpression[] operands = expression.getOperands(); if (operands.length < 2 || expression.getLastChild() instanceof PsiErrorElement) { return; } PsiExpression context = getContainingExpression(expression); PsiElement parent = PsiUtil.skipParenthesizedExprUp(context.getParent()); if (parent instanceof PsiAssignmentExpression assignment && isShiftEqToken(assignment.getOperationTokenType()) && PsiTreeUtil.isAncestor(assignment.getRExpression(), context, false)) { // like 'a <<= b * c'; 'b * c' should not be reported even if 'a' is long return; } if (parent instanceof PsiTypeCastExpression cast) { PsiType castType = cast.getType(); if (isNonLongInteger(castType)) return; if (PsiTypes.longType().equals(castType)) context = cast; } if (!PsiTypes.longType().equals(context.getType()) && !PsiTypes.longType().equals(ExpectedTypeUtils.findExpectedType(context, true))) { return; } if (ignoreNonOverflowingCompileTimeConstants) { try { if (ExpressionUtils.computeConstantExpression(expression, true) != null) { return; } } catch (ConstantEvaluationOverflowException ignore) { } if (cannotOverflow(expression, operands, tokenType.equals(JavaTokenType.LTLT))) { return; } } registerError(expression, tokenType); }