修复当注解存在循环引用时报错的问题

This commit is contained in:
huangchengxing
2022-09-21 18:18:55 +08:00
parent 96d6c39a14
commit de06d8777c
5 changed files with 21 additions and 12 deletions

View File

@@ -572,6 +572,7 @@ public class AnnotatedElementUtilTest {
// ================= interface =================
@Annotation6
@Target(ElementType.TYPE_USE)
@Retention(RetentionPolicy.RUNTIME)
private @interface Annotation5 {}

View File

@@ -170,6 +170,7 @@ public class MetaAnnotatedElementTest {
Assert.assertSame(source, element.getElement());
}
@Annotation4 // 循环引用
@Target(ElementType.TYPE_USE)
@Retention(RetentionPolicy.RUNTIME)
private @interface None { }

View File

@@ -199,6 +199,7 @@ public class RepeatableMetaAnnotatedElementTest {
@Retention(RetentionPolicy.RUNTIME)
private @interface Annotation3 { }
@Annotation4 // 循环引用
@Target(ElementType.TYPE_USE)
@Retention(RetentionPolicy.RUNTIME)
private @interface Annotation4 { }