On Mon, 9 Nov 2026 18:01:41 GMT, Lance Andersen <[email protected]> wrote:
> Please review this PR which moves the CEN Header size validation in > ZipOutputStream::writeCEN after the extended timestamp calculation which can > result in the extra field length and extra field data being modified. > > Mach5 tier1 - tier3 ran cleanly > > --------- > - [X] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This looks good to me. I just have a trivial comment about the test which I've added inline. test/jdk/java/util/zip/ZipOutputStream/ZipOutputStreamMaxCenHdrTest.java line 181: > 179: } catch (Exception e) { > 180: assertInstanceOf(ZipException.class, e); > 181: assertTrue(e.getMessage().matches(".*bad header size.*"), > "Unexpected ZipException message: " + e.getMessage()); Nit - I think it would be good to first check/assert if `e.getMessage()` is non-null. Otherwise, this may result in a `NullPointerException`. ------------- Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/33801#pullrequestreview-5891698407 PR Review Comment: https://git.openjdk.org/jdk/pull/33801#discussion_r4563759933
