|
36 | 36 | import java.nio.file.FileSystems;
|
37 | 37 | import java.nio.file.FileVisitOption;
|
38 | 38 | import java.nio.file.Files;
|
| 39 | +import java.nio.file.NoSuchFileException; |
39 | 40 | import java.nio.file.Path;
|
40 | 41 | import java.util.Collections;
|
41 | 42 | import java.util.Enumeration;
|
@@ -874,9 +875,9 @@ protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
|
874 | 875 | rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
|
875 | 876 | closeJarFile = !jarCon.getUseCaches();
|
876 | 877 | }
|
877 |
| - catch (ZipException | FileNotFoundException ex) { |
| 878 | + catch (ZipException | FileNotFoundException | NoSuchFileException ex) { |
878 | 879 | // Happens in case of a non-jar file or in case of a cached root directory
|
879 |
| - // without specific subdirectory present, respectively. |
| 880 | + // without the specific subdirectory present, respectively. |
880 | 881 | return Collections.emptySet();
|
881 | 882 | }
|
882 | 883 | }
|
@@ -1275,7 +1276,7 @@ private static String fixPath(String path) {
|
1275 | 1276 | }
|
1276 | 1277 |
|
1277 | 1278 | /**
|
1278 |
| - * Return a alternative form of the resource, i.e. with or without a leading slash. |
| 1279 | + * Return an alternative form of the resource, i.e. with or without a leading slash. |
1279 | 1280 | * @param path the file path (with or without a leading slash)
|
1280 | 1281 | * @return the alternative form or {@code null}
|
1281 | 1282 | */
|
|
0 commit comments