private static List<PsiClassType> getThrowsListWithoutCurrent(@NotNull final PsiReferenceList throwsList,
                                                                    @NotNull final PsiJavaCodeReferenceElement currentRef) {
        final PsiJavaCodeReferenceElement[] referenceElements = throwsList.getReferenceElements();

        checkInconsistency(throwsList);

        final PsiElementFactory factory = JavaPsiFacade.getElementFactory(throwsList.getProject());
        return StreamEx.of(referenceElements)
          .filter(ref -> ref != currentRef)
          .map(factory::createType)
          .toList();
      }
private static List<PsiClassType> getThrowsListWithoutCurrent(@NotNull final PsiReferenceList throwsList,
                                                                    @NotNull final PsiJavaCodeReferenceElement currentRef)