void (PsiElement body) { StreamEx<PsiExpression> stream; if (body instanceof PsiExpression expression) { stream = StreamEx.of(expression); } else if (body instanceof PsiCodeBlock block) { stream = StreamEx.of(PsiUtil.findReturnStatements(block)) .map(PsiReturnStatement::getReturnValue) .nonNull(); } else { return; } stream.flatMap(ExpressionUtils::nonStructuralChildren).forEach(expr -> { if (ExpressionUtils.computeConstantExpression(expr) instanceof Integer i && i == Integer.MIN_VALUE) { registerError(expr, InspectionGadgetsBundle.message("suspicious.comparator.compare.descriptor.min.value")); } }); }