On Tue, 21 Jan 2025 15:02:20 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>  Perhaps we should also add a test which verifies that the returned 
> InputStream reaches EOF (and the is.read() calls complete with -1 eventually) 
> when wrapped with a limiting BodyHandler with insufficient capacity.

Looking at the implementation of `BodyHandlers.ofInputStream()` it appears that 
such cases will result in an IOException being thrown from `read(...)` calls 
and not `-1`. So I stand corrected - the new test that we add should assert 
that the `IOException` gets thrown from `is.read(...)`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23096#discussion_r1923899035

Reply via email to