File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
spring-core/src/main/java/org/springframework/core/io/support Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 48
48
import org .apache .commons .logging .Log ;
49
49
import org .apache .commons .logging .LogFactory ;
50
50
51
+ import org .springframework .core .NativeDetector ;
51
52
import org .springframework .core .io .DefaultResourceLoader ;
52
53
import org .springframework .core .io .FileSystemResource ;
53
54
import org .springframework .core .io .Resource ;
191
192
* @author Costin Leau
192
193
* @author Phillip Webb
193
194
* @author Sam Brannen
195
+ * @author Sebastien Deleuze
194
196
* @since 1.0.2
195
197
* @see #CLASSPATH_ALL_URL_PREFIX
196
198
* @see org.springframework.util.AntPathMatcher
@@ -206,8 +208,10 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
206
208
* @since 6.0
207
209
* @see #isNotSystemModule
208
210
*/
209
- private static final Set <String > systemModuleNames = ModuleFinder .ofSystem ().findAll ().stream ()
210
- .map (moduleReference -> moduleReference .descriptor ().name ()).collect (Collectors .toSet ());
211
+ private static final Set <String > systemModuleNames = NativeDetector .inNativeImage () ? Collections .emptySet () :
212
+ ModuleFinder .ofSystem ().findAll ().stream ()
213
+ .map (moduleReference -> moduleReference .descriptor ().name ())
214
+ .collect (Collectors .toSet ());
211
215
212
216
/**
213
217
* {@link Predicate} that tests whether the supplied {@link ResolvedModule}
You can’t perform that action at this time.
0 commit comments