File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
spring-core/src/main/java/org/springframework/core/io/support Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -432,6 +432,9 @@ protected void addClassPathManifestEntries(Set<Resource> result) {
432
432
// Possibly "c:" drive prefix on Windows, to be upper-cased for proper duplicate detection
433
433
filePath = StringUtils .capitalize (filePath );
434
434
}
435
+ // # can appear in directories/filenames, java.net.URL should not treat it as a fragment
436
+ filePath = StringUtils .replace (filePath , "#" , "%23" );
437
+ // Build URL that points to the root of the jar file
435
438
UrlResource jarResource = new UrlResource (ResourceUtils .JAR_URL_PREFIX +
436
439
ResourceUtils .FILE_URL_PREFIX + filePath + ResourceUtils .JAR_URL_SEPARATOR );
437
440
// Potentially overlapping with URLClassLoader.getURLs() result above!
You can’t perform that action at this time.
0 commit comments