From dfc370c368cd45863c41ab65ca09a87f6b4a1250 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 19 Jun 2014 23:09:12 +0200 Subject: [PATCH] PathMatchingResourcePatternResolver's findPathMatchingResources needs to check for VFS before checking isJarResource Issue: SPR-11887 --- .../io/support/PathMatchingResourcePatternResolver.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java index 9118f62d78..1f54f63845 100644 --- a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java +++ b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java @@ -343,12 +343,12 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol Set result = new LinkedHashSet(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)); }