private static Collection<PsiClassType> getThrownTypes(@NotNull PsiTryStatement statement) {
    Collection<PsiClassType> types = new ArrayList<>();
    PsiCodeBlock tryBlock = statement.getTryBlock();
    if (tryBlock != null) {
      types.addAll(ExceptionUtil.getThrownExceptions(tryBlock));
    }
    PsiResourceList resourceList = statement.getResourceList();
    if (resourceList != null) {
      types.addAll(ExceptionUtil.getThrownExceptions(resourceList));
    }
    return types;
  }
private static Collection<PsiClassType> getThrownTypes(@NotNull PsiTryStatement statement)