|
|
@@ -344,12 +344,12 @@ public class EncryptExecutor {
|
|
|
})
|
|
|
.filter(zipEntryName -> {
|
|
|
if (excludeXmlPrefixSet != null) {
|
|
|
- boolean shouldExclude = excludeXmlPrefixSet.stream().anyMatch(zipEntryName::startsWith);
|
|
|
+ boolean shouldExclude = excludeXmlPrefixSet.stream().anyMatch(s -> StrUtil.regMatched(s, zipEntryName));
|
|
|
if (shouldExclude) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- return includeXmlPrefixSet.stream().anyMatch(zipEntryName::startsWith);
|
|
|
+ return includeXmlPrefixSet.stream().anyMatch(s -> StrUtil.regMatched(s, zipEntryName));
|
|
|
})
|
|
|
.collect(Collectors.toSet());
|
|
|
|
|
|
@@ -943,7 +943,7 @@ public class EncryptExecutor {
|
|
|
String classLongName = JavassistUtil.resolveClassName(file.getAbsolutePath(), true);
|
|
|
if (excludePrefixSet != null) {
|
|
|
for (String excludePrefix : excludePrefixSet) {
|
|
|
- if (classLongName.startsWith(excludePrefix)) {
|
|
|
+ if (StrUtil.regMatched(excludePrefix, classLongName)) {
|
|
|
// 排除
|
|
|
return null;
|
|
|
}
|
|
|
@@ -955,8 +955,8 @@ public class EncryptExecutor {
|
|
|
Pair<String, Map<String, String>> pair = extraPrefixAndParam(includePrefix);
|
|
|
String pureIncludePrefix = pair.getLeft();
|
|
|
Map<String, String> params = pair.getRight();
|
|
|
-
|
|
|
- if (classLongName.startsWith(pureIncludePrefix)) {
|
|
|
+
|
|
|
+ if (StrUtil.regMatched(pureIncludePrefix, classLongName)) {
|
|
|
// 包含
|
|
|
return EncryptClassArgs.create(file,
|
|
|
StrUtil.isTrueDefault(params.get(Constant.CLEAN_CLASS_ANNOTATION_PARAM_NAME), false),
|