Skip to content

Commit e71117d

Browse files
committed
Polish contribution
See gh-31598
1 parent d5874ab commit e71117d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ protected void addClassPathManifestEntries(Set<Resource> result) {
490490
String filePath = new File(path).getAbsolutePath();
491491
int prefixIndex = filePath.indexOf(':');
492492
if (prefixIndex == 1) {
493-
// Possibly "c:" drive prefix on Windows, to be upper-cased for proper duplicate detection
494-
// to resolve find duplicate jar resource on windows
493+
// Possibly a drive prefix on Windows (for example, "c:"), so we prepend a slash
494+
// and convert the drive letter to uppercase for consistent duplicate detection.
495495
filePath = "/" + StringUtils.capitalize(filePath);
496496
}
497497
// Since '#' can appear in directories/filenames, java.net.URL should not treat it as a fragment

0 commit comments

Comments
 (0)