Skip to content

Commit

Permalink
Drive letter case alignment in addClassPathManifestEntries
Browse files Browse the repository at this point in the history
Issue: SPR-16117

(cherry picked from commit a2f5e12)
  • Loading branch information
jhoeller committed Oct 27, 2017
1 parent 4208ec0 commit 8904de2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ protected void addClassPathManifestEntries(Set<Resource> result) {
javaClassPathProperty, System.getProperty("path.separator"))) {
try {
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 +
ResourceUtils.FILE_URL_PREFIX + filePath + ResourceUtils.JAR_URL_SEPARATOR);
// Potentially overlapping with URLClassLoader.getURLs() result above!
Expand Down

0 comments on commit 8904de2

Please sign in to comment.