HttpClient: sendAsync throws unspecified exceptions

XMLWordPrintable

    • Type: Bug
    • Resolution: Delivered
    • Priority: P4
    • 26
    • Affects Version/s: 26
    • Component/s: core-libs

      `HttpClientImpl::send` transforms thrown exceptions to `IOException`'s, as documented in its spec:

           * @throws IOException if an I/O error occurs when sending or receiving, or
           * the client has {@linkplain ##closing shut down}

      `sendAsync()` has a similar spec:

           * <p> The returned completable future completes exceptionally with:
           * <ul>
           * <li>{@link IOException} - if an I/O error occurs when sending or receiving,
           * or the client has {@linkplain ##closing shut down}.</li>

      Yet it doesn't have this exception translation logic and propagates unchecked exceptions as is[1], which is against the spec.

      [1] https://github.com/openjdk/jdk/pull/26155#discussion_r2235104122

        There are no Sub-Tasks for this issue.

            Assignee:
            Volkan Yazici
            Reporter:
            Volkan Yazici
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: