Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8368077

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • 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

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

              Created:
              Updated: