On Wed, 17 Nov 2021 09:59:43 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> ZipEntry::setComment indicates that the comment will be truncated if needed >> and ZipOutputStream takes care of this. >> >> Perhaps writeEND() should also be updated to something like: >> `writeBytes(comment, 0, Math.min(comment.length, 0xffff))` >> >> Which is similar to what happens in writeCEN >> >> Yes it would be nice to clarify that a null is accepted by setComment. When >> null is specified, the comment length is written as 0 > >> Yes it would be nice to clarify that a null is accepted by setComment. When >> null is specified, the comment length is written as 0 > > @mrserb Are you taking the spec clarification or should we just created > another issue in JBS to track it? I would like to update the spec for the null value for this method, and probably others in a separate CR, since this fix could be backported to the early releases. Will create such CR after agreement. ------------- PR: https://git.openjdk.java.net/jdk/pull/6380