On Fri, 20 Mar 2026 21:10:42 GMT, Eirik Bjørsnøs <[email protected]> wrote:
> However, ZipCoder.getBytes in ZipFS is different from the one in > java.util.zip in that it does not use the convenience CharsetEncoder::encode > method but implements its own decoding logic and throws IAE directly. > > I thnk this deserves a separate cleanup to align the ZipFS ZipCoder with the > java.util.zip implementation. We don't need two intricately different ways of > encoding and reporting errors. I filed https://bugs.openjdk.org/browse/JDK-8380570 to track this alignment cleanup. While I usually prefer issues being fixed in separate PRs, in this case the validation logic in this PR is highly related to the exception behavior of these ZipCoder methods, so I think it may make sense to handle it here and reducing PR/CI churn. So I have included the ZipCoder cleanups here in c55ff71, but happy to reconsider if reviewers prefer otherwise. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30319#discussion_r2969336166
