Skip to content

Commit 2df8ea9

Browse files
committed
Clean root entry path to match jar entries format in cache
Closes gh-34348
1 parent 323e52b commit 2df8ea9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

+2
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
813813
NavigableSet<String> entriesCache = this.jarEntriesCache.get(jarFileUrl);
814814
if (entriesCache != null) {
815815
Set<Resource> result = new LinkedHashSet<>(64);
816+
// Clean root entry path to match jar entries format without "!" separators
817+
rootEntryPath = rootEntryPath.replace(ResourceUtils.JAR_URL_SEPARATOR, "/");
816818
// Search sorted entries from first entry with rootEntryPath prefix
817819
for (String entryPath : entriesCache.tailSet(rootEntryPath, false)) {
818820
if (!entryPath.startsWith(rootEntryPath)) {

0 commit comments

Comments
 (0)