--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+@Anno
+aspect Foo {
+ public static void main(String []argv) {
+ System.out.println(Foo.class.getAnnotation(Anno.class));
+ }
+}
--- /dev/null
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+@Anno
+privileged aspect Foo2 {
+ public static void main(String []argv) {
+ System.out.println(Foo2.class.getAnnotation(Anno.class));
+ }
+}
*/
public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+// public void testLostAnnos_377130() {
+// runTest("missing annos on priv aspects");
+// }
+//
+// public void testLostAnnos_377130_2() {
+// runTest("missing annos on priv aspects - 2");
+// }
+
public void testAttributeErrorJ7() {
runTest("attribute issue with J7");
}
<suite>
+ <ajc-test dir="bugs170/pr377130" title="missing annos on priv aspects">
+ <compile files="Foo.java" options="-1.5"/>
+ <run class="Foo">
+ <stdout>
+ <line text="@Anno()"/></stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/pr377130" title="missing annos on priv aspects - 2">
+ <compile files="Foo2.java" options="-1.5"/>
+ <run class="Foo2">
+ <stdout>
+ <line text="@Anno()"/></stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs170/pr376351" title="attribute issue with J7">
<compile files="R.java R1.java" outjar="code.jar" options="-1.5"/>
<compile files="RAj.java" options="-1.7 -Xlint:ignore" outjar="aspects.jar" classpath="code.jar"/>