Integrated: 8340684: Reading from an input stream backed by a closed ZipFile has no test coverage

Eirik Bjørsnøs eirbjo at openjdk.org
Wed Sep 25 16:39:48 UTC 2024


On Mon, 23 Sep 2024 18:05:31 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> Please review this PR which adds test coverage for the case of reading from an input stream obtained using`ZipFile:getInputStream` after the backing `ZipFile` has been closed. 
> 
> The unspecified but long-standing behavior for this unusual use case is to throw `IOException`, but this is not verified by current tests. Adding a test would help prevent regressions in this area.
> 
> The test is parameterized to excercise a variation of stored/deflated entries, and a variation of read behaviors before the `ZipFile` is closed.

This pull request has now been integrated.

Changeset: 0e0b0b0d
Author:    Eirik Bjørsnøs <eirbjo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0e0b0b0d2626cda032f1500e64f6729554e47038
Stats:     128 lines in 1 file changed: 128 ins; 0 del; 0 mod

8340684: Reading from an input stream backed by a closed ZipFile has no test coverage

Reviewed-by: lancea

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

PR: https://git.openjdk.org/jdk/pull/21142


More information about the core-libs-dev mailing list