Since version 6.2.0-RC3 / #33705 the PathMatchingResourcePatternResolver
throws an java.util.zip.ZipException: zip file is empty
Exception when a none jar file is in the classpath.
I use IntelliJ to Build with maven, and IntelliJ adds a .license
file to the class path. There is already an issue in IntelliJ Youtrack opend 2021.
https://youtrack.jetbrains.com/issue/IDEA-262695/Maven-plexus-classworlds.license-is-added-to-classpath-breaks-Mwe2
Comment From: jhoeller
@finn0s here exactly does this break in PathMatchingResourcePatternResolver
? Which line throws that exception, could you share a stacktrace?
I'm going to review this myself on the basis of the #33705 changes, in preparation for the 6.2.3 release which is scheduled for tomorrow. In any case, a concrete pointer would be appreciated.
Comment From: jhoeller
Is this coming out of the jarCon.getJarFile()
call in line 840 by any chance? We just catch FileNotFoundException
there, not ZipException
... in contrast to all other creation of JarFile
instances where we catch ZipException
already.
Comment From: jhoeller
As far as I was able to reproduce this, it is indeed a ZipException
coming out of jarCon.getJarFile()
in such a case. I'll address this through extending the catch
clause there.