boolean (PsiCatchSection @NotNull [] catchSections) { PsiClassType assertionErrorType = PsiType.getTypeByName(JAVA_LANG_ASSERTION_ERROR, catchSections[0].getProject(), catchSections[0].getResolveScope()); for (PsiCatchSection section : catchSections) { PsiType catchType = section.getCatchType(); boolean isAssertionErrorInheritor = catchType != null && !catchType.equalsToText(JAVA_LANG_ASSERTION_ERROR) && assertionErrorType.isAssignableFrom(catchType); if (isAssertionErrorInheritor && !ControlFlowUtils.isEmptyCodeBlock(section.getCatchBlock())) return false; } return true; }