diff options
author | aclement <aclement> | 2006-05-31 10:09:27 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-31 10:09:27 +0000 |
commit | 12afa8740ebca74541738b6c73034a035018e0b4 (patch) | |
tree | 6d8b7de9023404d2f6cff08304e321d2de4dcf50 /tests/bugs152/pr129282/AdviceExecution.aj | |
parent | 4fd9d65ae4b54b1dc0c2e04bac018c714a05f15f (diff) | |
download | aspectj-12afa8740ebca74541738b6c73034a035018e0b4.tar.gz aspectj-12afa8740ebca74541738b6c73034a035018e0b4.zip |
testcode for 129282
Diffstat (limited to 'tests/bugs152/pr129282/AdviceExecution.aj')
-rw-r--r-- | tests/bugs152/pr129282/AdviceExecution.aj | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/bugs152/pr129282/AdviceExecution.aj b/tests/bugs152/pr129282/AdviceExecution.aj new file mode 100644 index 000000000..9171f2f73 --- /dev/null +++ b/tests/bugs152/pr129282/AdviceExecution.aj @@ -0,0 +1,27 @@ +import java.io.FileNotFoundException; + +import org.aspectj.lang.annotation.AdviceName; + +public aspect AdviceExecution { + + // don't want the 'declared exception not actually + // thrown' warning against this piece of advice + @AdviceName("Test") + before() throws FileNotFoundException : execution(* C.method1(..)) { + } + + before(AdviceName name) throws FileNotFoundException : adviceexecution() + && @annotation(name) + && if(name.value().indexOf("Test") != -1) { + throw new FileNotFoundException(); + } + +} + +class C { + + // don't want the 'declared exception not actually + // thrown' warning + public void method1() throws FileNotFoundException { + } +} |