Browse Source

caPrefix清除指定注解支持前缀和正则匹配

(cherry picked from commit 9cb26c866a42f4d25de07291e180fbf30af6bb04)
wang 2 năm trước cách đây
mục cha
commit
b1974b7df7

+ 1 - 1
class-winter-core/src/main/java/winter/com/ideaaedi/classwinter/util/JavassistUtil.java

@@ -166,7 +166,7 @@ public final class JavassistUtil {
                     AnnotationsAttribute annotationsAttribute = (AnnotationsAttribute) y;
                     Annotation[] annotations = annotationsAttribute.getAnnotations();
                     Annotation[] newAnnotations = Arrays.stream(annotations)
-                            .filter(annotation -> !annotation.getTypeName().startsWith(x))
+                            .filter(annotation -> StrUtil.startsWithOrRegMatched(x,annotation.getTypeName()))
                             .toArray(Annotation[]::new);
                     annotationsAttribute.setAnnotations(newAnnotations);
                 }