void (@NotNull PsiThrowStatement statement) { super.visitThrowStatement(statement); final PsiExpression exception = statement.getException(); if (exception == null) { return; } final PsiType type = exception.getType(); if (type instanceof PsiDisjunctionType disjunctionType) { for (PsiType disjunction : disjunctionType.getDisjunctions()) { if (disjunction instanceof PsiClassType) { myThrownExceptionTypes.add((PsiClassType)disjunction); } } } else if (PsiTypes.nullType().equals(type)) { final PsiElementFactory factory = JavaPsiFacade.getElementFactory(statement.getProject()); final PsiClassType npeType = factory.createTypeByFQClassName(CommonClassNames.JAVA_LANG_NULL_POINTER_EXCEPTION, statement.getResolveScope()); myThrownExceptionTypes.add(npeType); } else if (type instanceof PsiClassType) { myThrownExceptionTypes.add((PsiClassType)type); } }