Skip to content

Commit c489234

Browse files
committed
Polish contribution
See gh-31598 See gh-31603 (cherry picked from commit e71117d)
1 parent af59358 commit c489234

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -429,8 +429,8 @@ protected void addClassPathManifestEntries(Set<Resource> result) {
429429
String filePath = new File(path).getAbsolutePath();
430430
int prefixIndex = filePath.indexOf(':');
431431
if (prefixIndex == 1) {
432-
// Possibly "c:" drive prefix on Windows, to be upper-cased for proper duplicate detection
433-
// to resolve find duplicate jar resource on windows
432+
// Possibly a drive prefix on Windows (for example, "c:"), so we prepend a slash
433+
// and convert the drive letter to uppercase for consistent duplicate detection.
434434
filePath = "/" + StringUtils.capitalize(filePath);
435435
}
436436
// # can appear in directories/filenames, java.net.URL should not treat it as a fragment

0 commit comments

Comments
 (0)