void ( @NotNull PsiBinaryExpression expression) { super.visitBinaryExpression(expression); final PsiJavaToken sign = expression.getOperationSign(); final IElementType tokenType = sign.getTokenType(); if (!ExpressionParser.SHIFT_OPS.contains(tokenType)) return; final PsiExpression rhs = expression.getROperand(); if (rhs == null) return; final PsiType expressionType = expression.getType(); if (expressionType == null) return; LongRangeSet allowedRange; if (expressionType.equals(PsiTypes.longType())) { allowedRange = LongRangeSet.range(0, Long.SIZE - 1); } else if(expressionType.equals(PsiTypes.intType())) { allowedRange = LongRangeSet.range(0, Integer.SIZE - 1); } else { return; } LongRangeSet actualRange = CommonDataflow.getExpressionRange(rhs); if (actualRange != null && !actualRange.isEmpty() && !actualRange.intersects(allowedRange)) { registerError(sign, actualRange, expressionType.equals(PsiTypes.longType())); } }