see gh-19518

Comment From: philwebb

We should add a test for the original issue as well if possible when we merge this.

Comment From: nosan

Sure, could you please point me out, where the best place to add tests?

Comment From: philwebb

Very good question. It doesn't look like we have a CentralDirectoryFileHeaderTests class yet. We'll have a look when we merge to see if we can find a good place to add them.

Comment From: mbhave

We might be able to add it to JarFileTests.

Comment From: nosan

Unfortunately, I haven't found a way to test this :( I would appreciate any ideas regarding this.

Comment From: mbhave

Thanks for letting us know @nosan. I'm currently trying to write a test for it and will let you know how far I get.

Comment From: nosan

Thanks @mbhave

Comment From: mbhave

Thank you for your contribution @nosan!

Comment From: venkatasreekanth

Is there a workaround for this?

Comment From: wilkinsona

@venkatasreekanth As far as we know, this issue no longer occurs with Spring Boot 2.1.12 and later. If you are using a supported version of Spring Boot (2.5.x or later for OSS support) and the problem is occurring, please open a new issue with a minimal sample that reproduces the problem and we can take a look.

Comment From: venkatasreekanth

@venkatasreekanth As far as we know, this issue no longer occurs with Spring Boot 2.1.12 and later. If you are using a supported version of Spring Boot (2.5.x or later for OSS support) and the problem is occurring, please open a new issue with a minimal sample that reproduces the problem and we can take a look.

I making changes to a legacy project which runs spring boot 2.0.6 and use spring batch on SCDF 1.7. Looking for a workaround for now. We are upgrading to latest SCDF and all the batch projects in the near future.

Comment From: wilkinsona

The only thing that I can think of would be to identify the jar with the entries with a modification date of 0 and modifying it so that's no longer the case. Unzipping it and and zipping it be up again may be enough. Failing that, you'll either have to upgrade the version of Spring Boot that you're using or avoid depending on a jar that has entries with a modification date of 0. If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.