RFR: 8367067: Improve exception handling in HttpRequest.BodyPublishers [v3]

Jaikiran Pai jpai at openjdk.org
Thu Sep 18 16:33:58 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 47:

> 45: 
> 46:     PullPublisher(CheckedIterable<T> iterable, Throwable throwable) {
> 47:         if ((iterable == null) == (throwable == null)) {

Hello Volkan, I realize this style of condition check was done based on a review suggestion, so I don't expect you to undo it. Personally, I find this check hard to grasp and takes me a few rounds to understand what it is doing. But it's OK to leave it in this form.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2360192499


More information about the net-dev mailing list