|
|
@@ -161,17 +161,13 @@ public final class JavassistUtil {
|
|
|
}
|
|
|
// 删除指定注解
|
|
|
StrUtil.strToSet(toCleanAnnotationPrefix, "\\|").forEach(x -> attributeInfoList.forEach(y -> {
|
|
|
- try {
|
|
|
- if (y instanceof AnnotationsAttribute) {
|
|
|
- AnnotationsAttribute annotationsAttribute = (AnnotationsAttribute) y;
|
|
|
- Annotation[] annotations = annotationsAttribute.getAnnotations();
|
|
|
- Annotation[] newAnnotations = Arrays.stream(annotations)
|
|
|
- .filter(annotation -> !annotation.getTypeName().startsWith(x))
|
|
|
- .toArray(Annotation[]::new);
|
|
|
- annotationsAttribute.setAnnotations(newAnnotations);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- throw e;
|
|
|
+ if (y instanceof AnnotationsAttribute) {
|
|
|
+ AnnotationsAttribute annotationsAttribute = (AnnotationsAttribute) y;
|
|
|
+ Annotation[] annotations = annotationsAttribute.getAnnotations();
|
|
|
+ Annotation[] newAnnotations = Arrays.stream(annotations)
|
|
|
+ .filter(annotation -> !annotation.getTypeName().startsWith(x))
|
|
|
+ .toArray(Annotation[]::new);
|
|
|
+ annotationsAttribute.setAnnotations(newAnnotations);
|
|
|
}
|
|
|
}));
|
|
|
return true;
|