On Thu, 19 Mar 2026 20:38:04 GMT, Lance Andersen <[email protected]> wrote:

> ZipOutputStream::setComment and other setXXf methods throw 
> IllegalArgumentException vs ZipException per the javadocs so we have a 
> difference to deal as part of how we address the issue

Yes. I have not proposed any change there in this PR, just added the test to 
document current behavior and make any future regressions visible. Did you mean 
to suggest we take some other action here? 

> We probably want wrapper method (or overloaded) for at least ZipOutputStream 
> so we can avoid multiple try/catch

I don't think I understand what you suggest here. You mean methods in ZipCoder 
as Alan suggested? What do you think about my idea to consolidate ZipCoder 
methods on ZipCoder methods to throw mostly CharacterCodingException, as 
suggested in a reply to Alan above?

> Also, I am wondering if we should set the cause to an IAE as the cause to the 
> ZipException. Not sure there is a huge win valuewise, but thought I would 
> through it out for discussion

I like it, swallowing exceptions is rarely a win.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30319#discussion_r2962643590

Reply via email to