]> source.dussan.org Git - aspectj.git/commitdiff
262509: test and fix
authoraclement <aclement>
Tue, 27 Jan 2009 18:54:13 +0000 (18:54 +0000)
committeraclement <aclement>
Tue, 27 Jan 2009 18:54:13 +0000 (18:54 +0000)
tests/bugs164/pr262509/Foo.java [new file with mode: 0644]
tests/bugs164/pr262509/Foo2.java [new file with mode: 0644]
tests/bugs164/pr262509/Foo3.java [new file with mode: 0644]

diff --git a/tests/bugs164/pr262509/Foo.java b/tests/bugs164/pr262509/Foo.java
new file mode 100644 (file)
index 0000000..053f153
--- /dev/null
@@ -0,0 +1,20 @@
+
+public class Foo {
+       int i=3;
+       
+       // Need local variable table for this code to be OK and not lose the fact that this/etc are setup from
+       // instruction 0 to the end of the method
+       void foo(Bar bar) {
+               i = 33;
+               
+       }
+       public static void main(String[] args) {
+               new Foo().foo(null);
+       }
+}
+
+class Bar {}
+
+aspect FooAspect {
+       before(): execution(* *(..)) {}
+}
diff --git a/tests/bugs164/pr262509/Foo2.java b/tests/bugs164/pr262509/Foo2.java
new file mode 100644 (file)
index 0000000..552afa4
--- /dev/null
@@ -0,0 +1,26 @@
+
+public class Foo2 {
+       int i=3;
+       
+       // Need local variable table for this code to be OK and not lose the fact that this/etc are setup from
+       // instruction 0 to the end of the method
+       void foo(Bar bar) {
+               i = 33;
+        String s = "hello";
+        try {
+          String s2 = "hello2";
+          System.out.println(s2);
+        } catch (Exception e) {
+          e.printStackTrace();
+        }              
+       }
+       public static void main(String[] args) {
+               new Foo2().foo(null);
+       }
+}
+
+class Bar {}
+
+aspect FooAspect {
+       before(): execution(* *(..)) {}
+}
diff --git a/tests/bugs164/pr262509/Foo3.java b/tests/bugs164/pr262509/Foo3.java
new file mode 100644 (file)
index 0000000..017d386
--- /dev/null
@@ -0,0 +1,25 @@
+
+public class Foo3 {
+       int i=3;
+       
+       // Need local variable table for this code to be OK and not lose the fact that this/etc are setup from
+       // instruction 0 to the end of the method
+       void foo(Bar bar) {
+               i = 33;
+        try {
+System.out.println("x");
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+       }
+       public static void main(String[] args) {
+               new Foo3().foo(null);
+       }
+}
+
+class Bar {}
+
+aspect FooAspect {
+       before(): execution(* *(..)) {}
+       before(): execution(* *(..)) {}
+}