RFR: 8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes [v3]
Volker Simonis
simonis at openjdk.java.net
Mon Mar 28 10:13:15 UTC 2022
> The test `ZipFSOutputStreamTest` deflates content into a zip file system and subsequently inflates the deflated files and checks their content against the original data.
>
> The content consists of a data stream of bytes with the value `42`.
>
> The check currently compares the temporary inflation buffer with the original source buffer, no matter how many bytes were inflated into the inflation buffer. This can lead to problems with alternative zlib implementations which sometimes write beyond the last inflated byte (see [JDK-8282648](https://bugs.openjdk.java.net/browse/JDK-8282648) for more details).
>
> The fix is trivial. Only compare as many bytes as have been inflated against the original content.
Volker Simonis has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7984/files
- new: https://git.openjdk.java.net/jdk/pull/7984/files/810369c7..814a2f56
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7984&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7984&range=01-02
Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/7984.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7984/head:pull/7984
PR: https://git.openjdk.java.net/jdk/pull/7984
More information about the nio-dev
mailing list