private static boolean containsImmediateThrowStatement(PsiSwitchExpression expression) {
    Ref<Boolean> ref = Ref.create();
    ref.set(false);
    ControlFlowUtils.processElementsInCurrentScope(expression, element -> {
      if (element instanceof PsiThrowStatement) {
        ref.set(true);
        return false;
      }
      return true;
    });
    return ref.get();
  }
private static boolean containsImmediateThrowStatement(PsiSwitchExpression expression)