RFR: 8253952: Refine ZipOutputStream.putNextEntry() to recalculate ZipEntry's compressed size [v3]

Lance Andersen lancea at openjdk.java.net
Mon Oct 12 15:57:15 UTC 2020


On Mon, 12 Oct 2020 15:49:29 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/java/util/jar/JarOutputStream.java line 81:
>> 
>>> 79:      * any previous entry. The default compression method will be
>>> 80:      * used if no compression method was specified for the entry.
>>> 81:      * When writing a compressed (i.e. {@code ZipEntry.DEFLATED}))
>> 
>> I would leave as DEFLATED given it is used this way in other ZipOutputStream methods and I would also remove the  "i.e."
>
> I would prefer to keep it as "When writing as compressed (DEFLATED) ..." to keep the terminology consistent when
> linking to the setCompressedMethod.

Agree, no need for ZipEntry.DEFLATED which is what I was trying to say (sorry if that was not clear).  Only suggesting
ZipEntry.DEFLATED -> DEFLATED and remove  the ".i.e."

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

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



More information about the security-dev mailing list