Skip to content

Commit

Permalink
Consistently ignore non-jar files in classpath
Browse files Browse the repository at this point in the history
Closes gh-34417
  • Loading branch information
jhoeller committed Feb 12, 2025
1 parent b2134ee commit bbb593d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,9 @@ protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
closeJarFile = !jarCon.getUseCaches();
}
catch (FileNotFoundException ex) {
// Happens in case of cached root directory without specific subdirectory present.
catch (ZipException | FileNotFoundException ex) {
// Happens in case of a non-jar file or in case of a cached root directory
// without specific subdirectory present, respectively.
return Collections.emptySet();
}
}
Expand Down

0 comments on commit bbb593d

Please sign in to comment.