diff options
author | acolyer <acolyer> | 2004-08-19 12:29:04 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-08-19 12:29:04 +0000 |
commit | 65c67a4e848311efb7402f5d06bd1a833720b94b (patch) | |
tree | fdb6a106aa7059922e42adb079516a04c4093514 /tests/design/sourceLines | |
parent | 2834a7c26b42b8d98af57ef9733ae94fa4aa4a5b (diff) | |
download | aspectj-65c67a4e848311efb7402f5d06bd1a833720b94b.tar.gz aspectj-65c67a4e848311efb7402f5d06bd1a833720b94b.zip |
fix for Bugzilla Bug 37020
wrong line for method execution join point
Diffstat (limited to 'tests/design/sourceLines')
-rw-r--r-- | tests/design/sourceLines/TestSourceLines.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/design/sourceLines/TestSourceLines.java b/tests/design/sourceLines/TestSourceLines.java new file mode 100644 index 000000000..8a97048e8 --- /dev/null +++ b/tests/design/sourceLines/TestSourceLines.java @@ -0,0 +1,52 @@ +public class TestSourceLines { // L1 + + private int i = 0; // L3 + + private static int J = 1; // L5 + private static int K; // L6 + + static { // L8 + System.out.println("K = 2"); + } + + public TestSourceLines() { // L12 + i = 3; + } + + public TestSourceLines(int i) { // L16 + this.i = i; + } + + public void foo() { // L20 + System.out.println(i); + } + + private void bar() { System.out.println(i); } // L24 + + protected // L26 + void + goo() // L28 + { + System.out.println(i); + } + +} + +class NoStaticInitBlock { // L35 + +} + +aspect CheckLineNumbers { // L39 + + declare warning : execution(* TestSourceLines.*(..)) : "method execution"; + declare warning : execution(TestSourceLines.new(..)) : "cons execution"; + declare warning : staticinitialization(*) : "static init"; + declare warning : initialization(*.new(..)) : "init"; + declare warning : preinitialization(*.new(..)) : "pre-init"; + + before() : execution(* TestSourceLines.*(..)) { // L47 + System.out.println("boo"); + } + + declare warning : adviceexecution() : "advice"; +}
\ No newline at end of file |