RFR: 8275163: Deflater::deflate methods omit javadoc for ReadOnlyBufferException

Brian Burkhalter bpb at openjdk.java.net
Wed Oct 13 18:22:51 UTC 2021


On Wed, 13 Oct 2021 17:43:29 GMT, Lance Andersen <lancea at openjdk.org> wrote:

> Hi all,
> 
> Please review the fix to  address a javadoc issue for the  Deflater::deflate methods that were added as part of JDK-6341887 that could throw a ReadOnlyBufferException. 
> 
> The` @throws ` clause for `ReadOnlyBufferException`  was inadvertently omitted from the javadoc for these new methods.
> 
> A CSR, JDK-8275164, has also been created for this issue.
> 
> Best
> Lance

Marked as reviewed by bpb (Reviewer).

src/java.base/share/classes/java/util/zip/Deflater.java line 498:

> 496:      * @return the actual number of bytes of compressed data written to the
> 497:      *         output buffer
> 498:      * @throws ReadOnlyBufferException if the given output buffer is read-only

It could equally well simply state

if the buffer is read-only

but this is fine.

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

PR: https://git.openjdk.java.net/jdk/pull/5931


More information about the core-libs-dev mailing list