boolean (@NotNull final PsiDocTag tag, final @NotNull List<? extends PsiClassType> redundantThrows) { assert "throws".equals(tag.getName()) : "the tag has to be of the @throws kind"; final PsiClass throwsClass = JavaDocUtil.resolveClassInTagValue(tag.getValueElement()); if (throwsClass == null) return false; final PsiClassType type = PsiTypesUtil.getClassType(throwsClass); return redundantThrows.stream() .anyMatch(e -> e.isAssignableFrom(type)); }