@@ -365,19 +365,17 @@ protected void addAllClassLoaderJarRoots(ClassLoader classLoader, Set<Resource>
365
365
if (classLoader instanceof URLClassLoader ) {
366
366
try {
367
367
for (URL url : ((URLClassLoader ) classLoader ).getURLs ()) {
368
- if (ResourceUtils .isJarFileURL (url )) {
369
- try {
370
- UrlResource jarResource = new UrlResource (
371
- ResourceUtils .JAR_URL_PREFIX + url .toString () + ResourceUtils .JAR_URL_SEPARATOR );
372
- if (jarResource .exists ()) {
373
- result .add (jarResource );
374
- }
368
+ try {
369
+ UrlResource jarResource = new UrlResource (
370
+ ResourceUtils .JAR_URL_PREFIX + url .toString () + ResourceUtils .JAR_URL_SEPARATOR );
371
+ if (jarResource .exists ()) {
372
+ result .add (jarResource );
375
373
}
376
- catch ( MalformedURLException ex ) {
377
- if ( logger . isDebugEnabled () ) {
378
- logger .debug ( "Cannot search for matching files underneath [" + url +
379
- "] because it cannot be converted to a valid 'jar:' URL: " + ex . getMessage ());
380
- }
374
+ }
375
+ catch ( MalformedURLException ex ) {
376
+ if ( logger .isDebugEnabled ()) {
377
+ logger . debug ( "Cannot search for matching files underneath [ " + url +
378
+ "] because it cannot be converted to a valid 'jar:' URL: " + ex . getMessage ());
381
379
}
382
380
}
383
381
}
@@ -421,14 +419,12 @@ protected void addClassPathManifestEntries(Set<Resource> result) {
421
419
for (String path : StringUtils .delimitedListToStringArray (
422
420
javaClassPathProperty , System .getProperty ("path.separator" ))) {
423
421
try {
424
- if (path .endsWith (ResourceUtils .JAR_FILE_EXTENSION )) {
425
- File file = new File (path );
426
- UrlResource jarResource = new UrlResource (ResourceUtils .JAR_URL_PREFIX +
427
- ResourceUtils .FILE_URL_PREFIX + file .getAbsolutePath () +
428
- ResourceUtils .JAR_URL_SEPARATOR );
429
- if (jarResource .exists ()) {
430
- result .add (jarResource );
431
- }
422
+ File file = new File (path );
423
+ UrlResource jarResource = new UrlResource (ResourceUtils .JAR_URL_PREFIX +
424
+ ResourceUtils .FILE_URL_PREFIX + file .getAbsolutePath () +
425
+ ResourceUtils .JAR_URL_SEPARATOR );
426
+ if (jarResource .exists ()) {
427
+ result .add (jarResource );
432
428
}
433
429
}
434
430
catch (MalformedURLException ex ) {
0 commit comments