RFR: 8366439: test/jdk/java/util/zip/ZipFile/ZipSourceCache.java fails with AssertionFailedError: expected: <6> but was: <5>
Jaikiran Pai
jpai at openjdk.org
Wed Sep 3 08:55:48 UTC 2025
On Wed, 3 Sep 2025 07:32:19 GMT, Sean Coffey <coffeys at openjdk.org> wrote:
> I'm still thinking the inner ZIpFile logic might have an issue if it can't detect an update to a ZipFile. The inner Source class will return an incorrect mapping and CEN calculation if a new Source isn't created.
It's true that until a ZIP file update is detected then instances of `ZipFile` (including the newly created one) will continue to use the old cached CEN data and yes that's an inherent issue with the caching of this data. But that's not a new one and from what I know it has been there since we moved the ZIP handling code to java (and perhaps even before that https://bugs.openjdk.org/browse/JDK-8145260). However, i can't think of a simple way to avoid such situations.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27005#issuecomment-3248304828
More information about the core-libs-dev
mailing list