List<PsiClassType> (PsiElement element, PsiElement topElement, PsiSubstitutor substitutor, PsiClassType[] referencedTypes) { if (referencedTypes.length > 0) { List<PsiClassType> result = new ArrayList<>(); for (PsiClassType referencedType : referencedTypes) { final PsiType type = PsiClassImplUtil.correctType(GenericsUtil.eliminateWildcards(substitutor.substitute(referencedType), false), element.getResolveScope()); if (!(type instanceof PsiClassType)) continue; PsiClassType classType = (PsiClassType)type; PsiClass exceptionClass = ((PsiClassType)type).resolve(); if (exceptionClass == null) continue; if (isUncheckedException(classType)) continue; if (getHandlePlace(element, classType, topElement) != HandlePlace.UNHANDLED) continue; result.add((PsiClassType)type); } return result; } return Collections.emptyList(); }