-
Bug
-
Resolution: Fixed
-
P3
-
None
-
Verified
When compiling the code below, the field 'data' has 2 RuntimeVisibleTypeAnnotations, while the field in the anonymous class, 'data2' has3 RuntimeVisibleTypeAnnotations.
If there are 2 (such as @A @B data2) it has 6 (rather than 4). A complete test case is attached.
The same is true for methods.
class testclass {
@C String data = "test";
void mtest( testclass t){ }
public void test() {
mtest( new testclass() {
@D String data2 = "test";
});
}
}
@Retention(RUNTIME)
@Target({TYPE_USE,FIELD})
@interface C { }
@Retention(RUNTIME)
@Target({TYPE_USE,FIELD})
@interface D { }
If there are 2 (such as @A @B data2) it has 6 (rather than 4). A complete test case is attached.
The same is true for methods.
class testclass {
@C String data = "test";
void mtest( testclass t){ }
public void test() {
mtest( new testclass() {
@D String data2 = "test";
});
}
}
@Retention(RUNTIME)
@Target({TYPE_USE,FIELD})
@interface C { }
@Retention(RUNTIME)
@Target({TYPE_USE,FIELD})
@interface D { }