RFR: 8253952: Refine ZipOutputStream.putNextEntry() to recalculate ZipEntry's compressed size [v2]
Volker Simonis
simonis at openjdk.java.net
Mon Oct 12 11:49:12 UTC 2020
On Sun, 11 Oct 2020 22:14:18 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> src/java.base/share/classes/java/util/zip/ZipOutputStream.java line 189:
>>
>>> 187: * {@code ZipEntry.DEFLATED}) entries when {@link ZipEntry#setCompressedSize(long)}
>>> 188: * has not been explicitly called on the {@code ZipEntry}.
>>> 189: *
>>
>> Here's an alternative that might be a bit clearer to readers.
>>
>> "When writing a compressed (deflated) entry, and the compressed size has not been explicitly set with the
>> setCompressedSize method, then the compressed size written to the entry's data descriptor will be its actual compressed
>> size." I think we should put it after the "The default compression method .." sentence and move the sentence on the
>> time stamp to the end.
>
> I don't believe we discuss/reference the data descriptor for a Zip entry (outside of the PKWare Zip specification) so I
> am not sure we should reference it in the javadoc.
> Placing the sentence after "The default compression method will be used if no compression method was specified for the
> entry" makes sense
Thanks for your input. I've tried to somehow merge both suggestions :)
Did you had a chance to look at the CSR? I think somebody has to review it before I can move it to "Finalized".
Thank you and best regards,
Volker
-------------
PR: https://git.openjdk.java.net/jdk/pull/520
More information about the security-dev
mailing list