RFR: 8367067: Improve exception handling in HttpRequest.BodyPublishers [v3]
Jaikiran Pai
jpai at openjdk.org
Thu Sep 18 16:42:33 UTC 2025
On Thu, 18 Sep 2025 12:46:43 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Improves exception handling of built-in `HttpClient.BodyPublisher`s to ensure exceptions get propagated in a way compliant with the reactive specification.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix `FileChannelPublisherTest` failures
src/java.net.http/share/classes/jdk/internal/net/http/PullPublisher.java line 46:
> 44: private final Throwable throwable;
> 45:
> 46: PullPublisher(CheckedIterable<T> iterable, Throwable throwable) {
Looking at the usages of this constructor, would it be better if we got rid of this 2-arg constructor and introduced a new
PullPublisher(Throwable throwable) {
}
That way all we have to do is verify that the incoming argument is non-null, both in this constructor and the other existing `PullPublisher(CheckedIterable<T> iterable)`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2360235119
More information about the net-dev
mailing list