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

Brian Burkhalter bpb at openjdk.java.net
Wed Oct 13 18:28:56 UTC 2021


On Wed, 13 Oct 2021 18:24:39 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> 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.
>
> I thought about that but  I decided to go with the wording used for the change to Inflater::inflate that was added as part of JDK-6341887.  If I were to change it, I would want to change Inflater::inflate as well.

I retract my previous comment: I think you made the correct decision.

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

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


More information about the core-libs-dev mailing list