diff options
author | aclement <aclement> | 2009-01-27 18:54:13 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-01-27 18:54:13 +0000 |
commit | 2d1d2fde7ef8571c918df5fd11b8ed1271256d88 (patch) | |
tree | 99af930ca52b92f4767a413d94c0721885deaabe /tests/bugs164 | |
parent | 5911483599f9e45b4e3b82ddf024c1bf42302593 (diff) | |
download | aspectj-2d1d2fde7ef8571c918df5fd11b8ed1271256d88.tar.gz aspectj-2d1d2fde7ef8571c918df5fd11b8ed1271256d88.zip |
262509: test and fix
Diffstat (limited to 'tests/bugs164')
-rw-r--r-- | tests/bugs164/pr262509/Foo.java | 20 | ||||
-rw-r--r-- | tests/bugs164/pr262509/Foo2.java | 26 | ||||
-rw-r--r-- | tests/bugs164/pr262509/Foo3.java | 25 |
3 files changed, 71 insertions, 0 deletions
diff --git a/tests/bugs164/pr262509/Foo.java b/tests/bugs164/pr262509/Foo.java new file mode 100644 index 000000000..053f15356 --- /dev/null +++ b/tests/bugs164/pr262509/Foo.java @@ -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 index 000000000..552afa468 --- /dev/null +++ b/tests/bugs164/pr262509/Foo2.java @@ -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 index 000000000..017d3862f --- /dev/null +++ b/tests/bugs164/pr262509/Foo3.java @@ -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(* *(..)) {} +} |