RFD: A plan to untangle ZipFile.Source.initCEN

Eirik Bjørsnøs eirbjo at gmail.com
Fri Feb 13 14:58:24 UTC 2026


On Tue, Feb 10, 2026 at 7:24 PM Lance Andersen <lance.andersen at oracle.com>
wrote:

> While I think there may be some merit/benefit to what your suggesting, I
> think we should take a step back and also look at ZipFS to see what we
> might be able to share as part of a refactoring as there is a somewhat
> similar flow to ZipFS initCEN
>
> The benefit would be reducing the need to have to maintain somewhat
> duplicate code across both APIs.
>

Lance,

I think discussing a reusable CEN parsing library at this point may be a
bit premature. But we certainly don't want refactorings discussed here to
make such a future harder to get to.

If your concern is that the refactorings suggested here may make
ZipFile/ZipFS initCENs diverge further, then perhaps we can add as a goal
that these two should be refactored together?

We could certainly do that. Either in lockstep with each refactoring being
applied across APIs in the same PRs (where applicable), or we could clean
up the ZipFile first, then have a follow up where we realign ZipFS at the
end. Whatever we think makes most sense.

Wdyt?

Eirik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20260213/a8af4bcc/attachment.htm>


More information about the core-libs-dev mailing list