]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 152871: parsing bytecode too often (needs a wildcard pattern in the...
authoraclement <aclement>
Mon, 7 Aug 2006 12:58:51 +0000 (12:58 +0000)
committeraclement <aclement>
Mon, 7 Aug 2006 12:58:51 +0000 (12:58 +0000)
tests/bugs153/pr152871/MyAspect.java [new file with mode: 0644]
tests/bugs153/pr152871/MyClass.java [new file with mode: 0644]
tests/bugs153/pr152871/aop.xml [new file with mode: 0644]

diff --git a/tests/bugs153/pr152871/MyAspect.java b/tests/bugs153/pr152871/MyAspect.java
new file mode 100644 (file)
index 0000000..cbad3a9
--- /dev/null
@@ -0,0 +1,12 @@
+package a;
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class MyAspect {
+  //before(): call(* print(..)) {
+  @Before("call(* print(..))")
+  public void m() {
+    System.out.println("advice running");
+  }
+}
diff --git a/tests/bugs153/pr152871/MyClass.java b/tests/bugs153/pr152871/MyClass.java
new file mode 100644 (file)
index 0000000..5909e41
--- /dev/null
@@ -0,0 +1,12 @@
+package a;
+
+public class MyClass {
+  public static void main(String []argv) {
+    new MyClass().print("hello");
+    new MyClass().print("world");
+  }
+
+  public void print(String msg) {
+    System.out.println(msg);
+  }
+}
diff --git a/tests/bugs153/pr152871/aop.xml b/tests/bugs153/pr152871/aop.xml
new file mode 100644 (file)
index 0000000..3ba7ab6
--- /dev/null
@@ -0,0 +1,8 @@
+<aspectj>
+    <weaver>
+      <exclude within="a..MyAspect"/>
+    </weaver>
+    <aspects>
+         <aspect name="a.MyAspect"/> 
+    </aspects>
+</aspectj>