]> source.dussan.org Git - aspectj.git/commitdiff
309743
authoraclement <aclement>
Mon, 19 Apr 2010 22:19:17 +0000 (22:19 +0000)
committeraclement <aclement>
Mon, 19 Apr 2010 22:19:17 +0000 (22:19 +0000)
tests/bugs169/pr309743/A.java [new file with mode: 0644]
tests/bugs169/pr309743/B.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
tests/src/org/aspectj/systemtest/ajc150/ataspectj/annotationgen.xml
tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
tests/src/org/aspectj/systemtest/ajc169/transparentweaving.xml

diff --git a/tests/bugs169/pr309743/A.java b/tests/bugs169/pr309743/A.java
new file mode 100644 (file)
index 0000000..68bc77c
--- /dev/null
@@ -0,0 +1,21 @@
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+public class A {
+  public static void main(String []argv) throws Exception {
+    Method m = A.class.getDeclaredMethod("foo");
+    printM(m);
+  }
+  
+  private static void printM(Method m) {
+         System.out.println(m.getName());
+         Annotation[] as = m.getAnnotations();
+         for (Annotation a: as) {
+                 System.out.println(a);
+         }
+  }
+}
+
+aspect X {
+  public void A.foo() {}
+}
diff --git a/tests/bugs169/pr309743/B.java b/tests/bugs169/pr309743/B.java
new file mode 100644 (file)
index 0000000..fbc8b60
--- /dev/null
@@ -0,0 +1,23 @@
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+public class B {
+  public static void main(String []argv) {
+    Field[] fs = B.class.getDeclaredFields();
+    for (Field f: fs) {
+       printM(f);
+    }
+  }
+  
+  private static void printM(Field m) {
+         System.out.println(m.getName());
+         Annotation[] as = m.getAnnotations();
+         for (Annotation a: as) {
+                 System.out.println(a);
+         }
+  }
+}
+
+aspect X {
+  public int B.boo;
+}
index aed668c074dd54099dc700f50a0ee260fc4f784c..34f4e1658cd986284cedf2b79c35b8c8c22d10a2 100644 (file)
        </ajc-test>
        
        <ajc-test dir="java5/reflection" title="reflection on itds">
-               <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore"></compile>
+               <compile files="InterTypeDeclarations.aj,ReflectOnCodeStyleITDs.java" options="-1.5 -Xlint:ignore -makeAjReflectable"></compile>
                <run class="ReflectOnCodeStyleITDs" classpath="../lib/bcel/bcel.jar">
                  <stdout>
                        <line text="public C.new(int, int, int)"/>
        
        
        <ajc-test dir="java5/reflection" pr="114322" title="reflection on abstract ITDs (Billing example)">
-               <compile files="ReflectBilling.java,Billing.aj" options="-1.5"/>
+               <compile files="ReflectBilling.java,Billing.aj" options="-1.5 -makeAjReflectable"/>
                <run class="ReflectBilling">
                        <stdout>
                                <line text="public void Customer.addCharge(long)"/>
index c42dbb642958e34ae4617d3bac4557b0a51e239a..3a8bda2ad3a5fec8ed5764faf843f6cb0b7720fd 100644 (file)
     </ajc-test>
     
     <ajc-test dir="java5/ataspectj/annotationGen" title="ann gen for itds">
-        <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore">
+        <compile files="ITDTest.aj" options="-1.5, -outxml -Xlint:ignore -makeAjReflectable">
         </compile>
         <run class="a.b.c.ITDTest" ltw=""/>
     </ajc-test>    
index 5c5cea505b888b3e36c71b31d66244ae1c6ff077..be42a3e9d0913ab1477b4ec8d6440707fd92f297 100644 (file)
@@ -30,6 +30,14 @@ public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        // runTest("advising privileged access method");
        // }
 
+       public void testItdMarkerAnnotations_309743() {
+               runTest("itd marker annotations - 1");
+       }
+       
+       public void testItdMarkerAnnotations_309743_2() {
+               runTest("itd marker annotations - 2");
+       }
+       
        public void testPipeliningAndGenerics_309336() {
                runTest("pipelining and generics");
        }
index 5e907f7319ac136621d76baf61a8a36206e0ac92..0b0fe443e8ba5d1434042e952760cf84bfb52767 100644 (file)
@@ -2,6 +2,24 @@
 
 <suite>
 
+   <ajc-test dir="bugs169/pr309743" title="itd marker annotations - 1">
+     <compile files="A.java" options="-1.5"/>
+     <run class="A">
+       <stdout>
+         <line text="foo"/>
+       </stdout>
+     </run>
+  </ajc-test>
+  
+   <ajc-test dir="bugs169/pr309743" title="itd marker annotations - 2">
+     <compile files="B.java" options="-1.5"/>
+     <run class="B">
+       <stdout>
+         <line text="boo"/>
+       </stdout>
+     </run>
+  </ajc-test>
+  
    <ajc-test dir="bugs169/pr309336" title="pipelining and generics">
      <compile files="NoSystemStreams.aj UseOperators.java Operators.java" options="-1.5">
        <message kind="warning" text="No system.out"/>
index 10351bdc42ba88287c341b8dddf79e4a5b0d6fc2..4eb5f6d37ea256dcb49b9773a6027860f091f22c 100644 (file)
    </ajc-test>
    
    <ajc-test dir="features169/transparent" title="declare at on private itd">
-     <compile files="OneDeclareAt.java" options="-1.5"/>
+     <compile files="OneDeclareAt.java" options="-1.5 -makeAjReflectable"/>
    </ajc-test>
    
    <ajc-test dir="features169/transparent" title="declare at two">
-     <compile files="DeclareAtTwo.java" options="-1.5"/>
+     <compile files="DeclareAtTwo.java" options="-1.5 -makeAjReflectable"/>
    </ajc-test>
    
    <ajc-test dir="features169/transparent" title="three">