mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 20:59:07 +00:00
Drive letter case alignment in addClassPathManifestEntries
Issue: SPR-16117
This commit is contained in:
+5
@@ -424,6 +424,11 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
|||||||
javaClassPathProperty, System.getProperty("path.separator"))) {
|
javaClassPathProperty, System.getProperty("path.separator"))) {
|
||||||
try {
|
try {
|
||||||
String filePath = new File(path).getAbsolutePath();
|
String filePath = new File(path).getAbsolutePath();
|
||||||
|
int prefixIndex = filePath.indexOf(':');
|
||||||
|
if (prefixIndex == 1) {
|
||||||
|
// Possibly "c:" drive prefix on Windows, to be upper-cased for proper duplicate detection
|
||||||
|
filePath = filePath.substring(0, 1).toUpperCase() + filePath.substring(1);
|
||||||
|
}
|
||||||
UrlResource jarResource = new UrlResource(ResourceUtils.JAR_URL_PREFIX +
|
UrlResource jarResource = new UrlResource(ResourceUtils.JAR_URL_PREFIX +
|
||||||
ResourceUtils.FILE_URL_PREFIX + filePath + ResourceUtils.JAR_URL_SEPARATOR);
|
ResourceUtils.FILE_URL_PREFIX + filePath + ResourceUtils.JAR_URL_SEPARATOR);
|
||||||
// Potentially overlapping with URLClassLoader.getURLs() result above!
|
// Potentially overlapping with URLClassLoader.getURLs() result above!
|
||||||
|
|||||||
Reference in New Issue
Block a user