mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
WW-4116 Reduces work when scanning packages
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1494876 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+6
-8
@@ -562,16 +562,14 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
|
||||
* @return true if class package is on the {@link #packageLocators} list
|
||||
*/
|
||||
protected boolean checkPackageLocators(String classPackageName) {
|
||||
if (packageLocators != null && !disablePackageLocatorsScanning) {
|
||||
for (String packageLocator : packageLocators) {
|
||||
if (classPackageName.length() > 0
|
||||
&& (packageLocatorsBasePackage == null || classPackageName
|
||||
if (packageLocators != null && !disablePackageLocatorsScanning && classPackageName.length() > 0
|
||||
&& (packageLocatorsBasePackage == null || classPackageName
|
||||
.startsWith(packageLocatorsBasePackage))) {
|
||||
String[] splitted = classPackageName.split("\\.");
|
||||
for (String packageLocator : packageLocators) {
|
||||
String[] splitted = classPackageName.split("\\.");
|
||||
|
||||
if (StringTools.contains(splitted, packageLocator, false))
|
||||
return true;
|
||||
}
|
||||
if (StringTools.contains(splitted, packageLocator, false))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user