From c14e0532fcd6d68c43a3c974efec9d15b6e4b217 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Mon, 3 Feb 2014 21:44:59 +0100 Subject: SI-4788/SI-5948 Respect RetentionPolicy of Java annotations Note that I removed the check to ignore @deprecated: - @deprecated extends StaticAnnotation, so they aren't supposed to show up in the RuntimeInvisibleAnnotation attribute anyway, and the earlier check for "extends ClassfileAnnotationClass" makes this check superflous anyway. - Otherwise, if @deprecated was extending ClassfileAnnotationClass it would seem inconsistent that we don't emit @deprecated, but would do so for @deprecatedOverriding, @deprecatedInheritance, etc. Anyway, due to ClassfileAnnotation not working in Scala, and the additional check which only allows Java-defined annotations, this is pretty pointless from every perspective. --- test/files/run/t4788-separate-compilation/CAnnotation_1.java | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/files/run/t4788-separate-compilation/CAnnotation_1.java (limited to 'test/files/run/t4788-separate-compilation/CAnnotation_1.java') diff --git a/test/files/run/t4788-separate-compilation/CAnnotation_1.java b/test/files/run/t4788-separate-compilation/CAnnotation_1.java new file mode 100644 index 0000000000..7120218d62 --- /dev/null +++ b/test/files/run/t4788-separate-compilation/CAnnotation_1.java @@ -0,0 +1,5 @@ +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.CLASS; + +@Retention(value=CLASS) +@interface CAnnotation {} -- cgit v1.2.3