On Fri, 20 Mar 2026 12:37:22 GMT, Jaikiran Pai <[email protected]> wrote:
>> Eirik Bjørsnøs has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> initCause original exception
>
> test/jdk/java/util/zip/ZipOutputStream/UnmappableZipEntryNameOrComment.java
> line 93:
>
>> 91: assertDoesNotThrow(() -> {
>> 92: try (var out = new ZipOutputStream(nullOutputStream(),
>> CHARSET)) {
>> 93: assertThrows(IllegalArgumentException.class, () ->
>> out.setComment(comment));
>
> `ZipOutputStream.setComment(...)` specifies:
>
>> * @throws IllegalArgumentException if the length of the specified ZIP file
>> comment is greater than 0xFFFF bytes
>
> I think we should improve that specification (backed by a CSR) to say that it
> throws that exception even for a comment that cannot be mapped to the charset
> in use. That update would then match the current behaviour of that method.
If you prefer doing that update to the specification of
`ZipOutputStream.setComment(...)` as a separate task, that's fine too. In that
case, it would be better to introduce this test method as part of that other
work.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30319#discussion_r2965552502