RFR: 8252374: Add a new factory method to concatenate a sequence of BodyPublisher instances into a single publisher. [v10]

Chris Hegarty chegar at openjdk.java.net
Wed Oct 7 08:17:09 UTC 2020


On Tue, 6 Oct 2020 17:03:28 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Continuing the review with a PR...
>> 
>> 8252374: Add a new factory method to concatenate a sequence
>>          of BodyPublisher instances into a single publisher.
>> https://bugs.openjdk.java.net/browse/JDK-8252374
>> 
>> 
>> Draft CSR:
>> https://bugs.openjdk.java.net/browse/JDK-8252382
>
> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed handling of negative request. Added BodyPublishers::concat to the TCK tests.

src/java.net.http/share/classes/jdk/internal/net/http/PullPublisher.java line 105:

> 103:                 }
> 104:
> 105:                 while (demand.tryDecrement() && !cancelled && error == null) {

The changes to `PullPublisher` seem like a general bug fix unrelated to `concat`. Is that true? Does it make sense to
separate them out, or are they only applicable to a very narrow boundary scenario?

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

PR: https://git.openjdk.java.net/jdk/pull/57


More information about the net-dev mailing list