Consistently ignore non-jar files in classpath
Closes gh-34417
This commit is contained in:
parent
b2134ee71f
commit
bbb593db48
|
@ -843,8 +843,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
||||||
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
|
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
|
||||||
closeJarFile = !jarCon.getUseCaches();
|
closeJarFile = !jarCon.getUseCaches();
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException ex) {
|
catch (ZipException | FileNotFoundException ex) {
|
||||||
// Happens in case of cached root directory without specific subdirectory present.
|
// Happens in case of a non-jar file or in case of a cached root directory
|
||||||
|
// without specific subdirectory present, respectively.
|
||||||
return Collections.emptySet();
|
return Collections.emptySet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue