]> source.dussan.org Git - aspectj.git/commitdiff
327867
authoraclement <aclement>
Mon, 2 May 2011 19:37:31 +0000 (19:37 +0000)
committeraclement <aclement>
Mon, 2 May 2011 19:37:31 +0000 (19:37 +0000)
tests/bugs1612/pr327867/Foo.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml

diff --git a/tests/bugs1612/pr327867/Foo.java b/tests/bugs1612/pr327867/Foo.java
new file mode 100644 (file)
index 0000000..1d2771b
--- /dev/null
@@ -0,0 +1,18 @@
+public class Foo {
+
+  public static void main(String[]argv) {
+    new Foo().m();
+  }
+
+  public void m() {
+    int j = new Bar().i;
+  }
+
+  private class Bar {
+    private int i;
+  }
+}
+
+aspect X {
+  before(): execution( !synthetic * *(..)) {}
+}
index 8ec90e651d20414483eaf86f96d7e25f26e74c4e..3404939ac0c11a63d1dd55cb763ee8f115081bd2 100644 (file)
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
  */
 public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       public void testSyntheticMethods_327867() {
+               runTest("synthetic methods");
+       }
+
        // public void testSignedJarLtw_328099() {
        // runTest("signed jar ltw");
        // }
index fe83acac7a610763bcc5a51f14cd9b3b457f9e8f..45b8b9c51e1b8a2c5253c6184a64c0ec231ab775 100644 (file)
@@ -2,6 +2,15 @@
 
 <suite>
 
+<ajc-test dir="bugs1612/pr327867" title="synthetic methods">
+<compile files="Foo.java" options="-1.5 -showWeaveInfo">
+<message kind="weave" text="Join point 'method-execution(void Foo.main(java.lang.String[]))' in Type 'Foo' (Foo.java:3) advised by before advice from 'X' (Foo.java:17)"/>
+<message kind="weave" text="Join point 'method-execution(void Foo.m())' in Type 'Foo' (Foo.java:7) advised by before advice from 'X' (Foo.java:17)"/>
+</compile>
+<run class="Foo"/>
+</ajc-test>
+
+
 <ajc-test dir="bugs1612/pr328099" title="signed jar ltw">
 <compile files="X.java" classpath="code.jar"/>
 <run class="foo.bar.FooLaunch" ltw="aop.xml" classpath="$sandbox/code.jar">