On Mon, 8 Sep 2025 18:33:04 GMT, Volkan Yazici <[email protected]> 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 three 
> additional commits since the last revision:
> 
>  - Remove IOE rethrows
>  - Revert `FilePublisherTest` and `FlowAdapterPublisherTest` changes
>  - Make `CheckedIterable` throw exceptions

RequestPublishers$FilePublisher and RequestPublishers$InputStreamPublisher 
should be final

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

> 35:  * Each new subscription gets a new {@link CheckedIterator}.
> 36:  */
> 37: class PullPublisher<T> implements Flow.Publisher<T> {

Suggestion:

final class PullPublisher<T> implements Flow.Publisher<T> {

add final

src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java 
line 202:

> 200:     }
> 201: 
> 202:     public static class StringPublisher extends ByteArrayPublisher {

Suggestion:

    public static final class StringPublisher extends ByteArrayPublisher {

src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java 
line 208:

> 206:     }
> 207: 
> 208:     public static class EmptyPublisher implements BodyPublisher {

Suggestion:

    public static final class EmptyPublisher implements BodyPublisher {

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

PR Comment: https://git.openjdk.org/jdk/pull/26876#issuecomment-3289406471
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2347225544
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2347227054
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2347227613

Reply via email to