mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Fix non-pattern package prefix check in CandidateComponentsIndex
Prior to this commit, the non-pattern package prefix check used packageName.startsWith(basePackage) which incorrectly treats "com.example2.foo" as a subpackage of "com.example". Closes gh-35601 Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
This commit is contained in:
committed by
Sam Brannen
parent
51d6e8beb0
commit
113b9d131c
+1
-1
@@ -150,7 +150,7 @@ public class CandidateComponentsIndex {
|
||||
return pathMatcher.match(basePackage, packageName);
|
||||
}
|
||||
else {
|
||||
return packageName.startsWith(basePackage);
|
||||
return packageName.equals(basePackage) || packageName.startsWith(basePackage + ".");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user