Browse Source

PathMatchingResourcePatternResolver's findPathMatchingResources needs to check for VFS before checking isJarResource

Issue: SPR-11887
pull/1385/head
Juergen Hoeller 11 years ago
parent
commit
dfc370c368
  1. 8
      spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

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

@ -343,12 +343,12 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol @@ -343,12 +343,12 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
Set<Resource> result = new LinkedHashSet<Resource>(16);
for (Resource rootDirResource : rootDirResources) {
rootDirResource = resolveRootDirResource(rootDirResource);
if (isJarResource(rootDirResource)) {
result.addAll(doFindPathMatchingJarResources(rootDirResource, subPattern));
}
else if (rootDirResource.getURL().getProtocol().startsWith(ResourceUtils.URL_PROTOCOL_VFS)) {
if (rootDirResource.getURL().getProtocol().startsWith(ResourceUtils.URL_PROTOCOL_VFS)) {
result.addAll(VfsResourceMatchingDelegate.findMatchingResources(rootDirResource, subPattern, getPathMatcher()));
}
else if (isJarResource(rootDirResource)) {
result.addAll(doFindPathMatchingJarResources(rootDirResource, subPattern));
}
else {
result.addAll(doFindPathMatchingFileResources(rootDirResource, subPattern));
}

Loading…
Cancel
Save