boolean (PsiType type) { if (type instanceof PsiDisjunctionType disjunctionType) { for (PsiType disjunction : disjunctionType.getDisjunctions()) { if (hasJavaLangThreadDeathType(disjunction)) { return true; } } } else if (type instanceof PsiClassType classType) { final PsiClass aClass = classType.resolve(); if (InheritanceUtil.isInheritor(aClass, "java.lang.ThreadDeath")) { return true; } } return false; }