boolean ( PsiSwitchBlock switchStatement, PsiMethod method) { final PsiCodeBlock body = switchStatement.getBody(); if (body == null) { return true; } final PsiStatement[] statements = body.getStatements(); for (final PsiStatement statement : statements) { if (statement instanceof PsiSwitchLabelStatement) { continue; } if (statement instanceof PsiSwitchLabeledRuleStatement labeledRuleStatement) { if (statementMayReturnBeforeRecursing(labeledRuleStatement.getBody(), method)) { return true; } continue; } if (statementMayReturnBeforeRecursing(statement, method)) { return true; } } return false; }