-
Couldn't load subscription status.
- Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
getResources("jar:file:/Users/xxxxx/.gradle/caches/modules-2/files-2.1/com.example1/example1/1.0.0/92cc99358ea6b25f5b9981c2a3f04e595705403f/example2-1.0.0.jar!/com/example1/")- field
rootDirCachewill cachejar:file:/Users/xxxxx/.gradle/caches/modules-2/files-2.1/com.example1/example1/1.0.0/92cc99358ea6b25f5b9981c2a3f04e595705403f/example2-1.0.0.jar!/com/example1/ getResources("jar:file:/Users/xxxxx/.gradle/caches/modules-2/files-2.1/com.example2/example2/1.0.0/92cc99358ea6b25f5b9981c2a3f04e595705403f/example2-1.0.0.jar!/com/example2/")- field
rootDirCachewill remove existingPath and put new pathjar:file:/Users/xxxxx/.gradle/caches/modules-2/files-2.1/causes FileNotFoundException
Link: 19fec06#diff-69e11ca5877c77cb766565b03d43386f382f5321c62017d9e92f3615f6b3183eR605
Path judgment should be added to avoid caching invalid paths
Old
if (currentPrefix != null) {
// A prefix match found, potentially to be turned into a common parent cache entry.
if (commonPrefix == null || !commonUnique || currentPrefix.length() > commonPrefix.length()) {
commonPrefix = currentPrefix;
existingPath = path;
}
else if (currentPrefix.equals(commonPrefix)) {
commonUnique = false;
}
}New
if (currentPrefix != null) {
boolean startsWithJar = currentPrefix.startsWith("jar:");
boolean containsJarExclamation = currentPrefix.contains(".jar!");
if (startsWithJar && containsJarExclamation) {
// A prefix match found, potentially to be turned into a common parent cache entry.
if (commonPrefix == null || !commonUnique || currentPrefix.length() > commonPrefix.length()) {
commonPrefix = currentPrefix;
existingPath = path;
}
else if (currentPrefix.equals(commonPrefix)) {
commonUnique = false;
}
}
}stephanie-dm and botex98
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regressionA bug that is also a regression