-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b19
-
Not verified
Consider this source code:
---
import java.lang.annotation.*;
public class AnnotCopiedToAnonymous {
private Object o = new @Annot Object() { };
}
@Target({ElementType.TYPE, ElementType.TYPE_USE})
@interface Annot { }
---
The generated anonymous innerclass (AnnotCopiedToAnonymous$1) has the Annot annotation as a declaration annotation in its RuntimeInvisibleAnnotations in addition to having it in its RuntimeInvisibleTypeAnnotations with a supertype target.
The annotation should not be listed in the RuntimeInvisibleAnnotations attribute, see:
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2014-March/001663.html
---
import java.lang.annotation.*;
public class AnnotCopiedToAnonymous {
private Object o = new @Annot Object() { };
}
@Target({ElementType.TYPE, ElementType.TYPE_USE})
@interface Annot { }
---
The generated anonymous innerclass (AnnotCopiedToAnonymous$1) has the Annot annotation as a declaration annotation in its RuntimeInvisibleAnnotations in addition to having it in its RuntimeInvisibleTypeAnnotations with a supertype target.
The annotation should not be listed in the RuntimeInvisibleAnnotations attribute, see:
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2014-March/001663.html
- relates to
-
JDK-8023682 Incorrect attributes emitted for anonymous class declaration
-
- Closed
-
-
JDK-8035890 jdk8 javac -source 7 compiles test case it should not
-
- Closed
-