On Mon, 16 Sep 2024 18:19:34 GMT, Alan Bateman <[email protected]> wrote:
>> ZipOutputStream::close() calls DeflaterOutputStream::close() will in turn
>> will call ZipOutputStream::finish()
>>
>> I could remove the above and just leave the verbiage in
>> ZipOutputStream::finish(), I only added it to close as I didn't think it was
>> obvious that close resulted in a call to finish.
>>
>> I do not have a strong preference or do you have an alterantive suggestion?
>
> I think having ZOS.close say that it finishes writing the contents of the ZIP
> output stream and closes it, would make the API docs easier to read. If you
> do then no need for close to talk about the ZipException.
Is this what you were thinking:
/**
- * Closes the ZIP output stream as well as the stream being filtered.
+ * Finishes writing the contents of the ZIP output stream. The
+ * underlying stream will also be closed as well as the stream being
filtered.
* <p>
- * A ZipException will be thrown if the combined length of the entry name,
- * the extra field data, the entry comment and {@linkplain #CENHDR CEN
Header size},
- * exceeds 65,535 bytes.
* @throws ZipException if a ZIP file error has occurred
* @throws IOException if an I/O error has occurred
*/
And leaving the verbiage in finish() as is?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21003#discussion_r1761662664