Improve jdk.internal.net.http.PullPublisher interface when accepting a Throwable

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Withdrawn
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: core-libs

      `PullPublisher` logic is branching on the `throwable == null` condition on several places – this increases code size and complexity. Plus, all `PullPublisher::new` call sites know at compile time whether `throwable` is null or not. `PullPublisher` should have distinct factory methods (or constructors) each accepting only either a `CheckedIterable` or a `Throwable`, but not both.

      Related discussions:

      - https://github.com/openjdk/jdk/pull/26876/files#r2329782120
      - https://github.com/openjdk/jdk/pull/26876/files#r2360235119

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

              Created:
              Updated:
              Resolved: