void (@NotNull PsiTryStatement statement) { super.visitTryStatement(statement); final PsiCodeBlock tryBlock = statement.getTryBlock(); if (tryBlock == null) { return; } final Set<PsiClassType> thrownTypes = ExceptionUtils.calculateExceptionsThrown(tryBlock); ExceptionUtils.calculateExceptionsThrown(statement.getResourceList(), thrownTypes); final Set<PsiType> caughtTypes = new HashSet<>(thrownTypes.size()); final PsiCatchSection[] catchSections = statement.getCatchSections(); boolean runtimeExceptionSeen = false; for (final PsiCatchSection catchSection : catchSections) { final PsiParameter parameter = catchSection.getParameter(); if (parameter == null) { continue; } final PsiTypeElement typeElement = parameter.getTypeElement(); if (typeElement == null) { continue; } final PsiTypeElement[] children = PsiTreeUtil.getChildrenOfType(typeElement, PsiTypeElement.class); if (children != null) { for (PsiTypeElement child : children) { runtimeExceptionSeen = check(thrownTypes, child, runtimeExceptionSeen, caughtTypes); } } else { runtimeExceptionSeen = check(thrownTypes, typeElement, runtimeExceptionSeen, caughtTypes); } } }