RFR: 8026127: Deflater/Inflater documentation incomplete/misleading

Jaikiran Pai jpai at openjdk.org
Sat Jun 1 04:38:26 UTC 2024


Can I please get a review of this doc-only change which proposes to improve the code snippet that's in `java.util.zip.Deflater` and `java.util.zip.Inflater` to better explain the usage of those classes? This addresses https://bugs.openjdk.org/browse/JDK-8026127.

The commit in the PR cleans up the snippet to correctly compress/decompress till the `Deflater` and `Inflater` are `finished()`.  Additionally, the snippet also shows that the `Deflater` and `Inflater` are expected to be closed when their usage it done, to release the resources held by those instances.

I've run `make docs-image` locally to verify that the generated snippet content as well as the link from `Inflater` work fine in the rendered javadoc HTML.

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

Commit messages:
 - 8026127: Deflater/Inflater documentation incomplete/misleading

Changes: https://git.openjdk.org/jdk/pull/19507/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19507&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8026127
  Stats: 88 lines in 2 files changed: 31 ins; 31 del; 26 mod
  Patch: https://git.openjdk.org/jdk/pull/19507.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19507/head:pull/19507

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


More information about the core-libs-dev mailing list