diff options
author | aclement <aclement> | 2006-09-11 16:59:56 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-09-11 16:59:56 +0000 |
commit | 018b33eab8e607e54b65752cc65a25b66e1a0e91 (patch) | |
tree | 5a5ea9c35fc54d5ef6c4f9ff6ceeb4217f222d50 /tests/bugs153 | |
parent | e5b2cd7148abec67d52132a9cddb9aea91acc9a1 (diff) | |
download | aspectj-018b33eab8e607e54b65752cc65a25b66e1a0e91.tar.gz aspectj-018b33eab8e607e54b65752cc65a25b66e1a0e91.zip |
test and fix for 155763 - incorrect codegen from compiler leads to NPE
Diffstat (limited to 'tests/bugs153')
-rw-r--r-- | tests/bugs153/pr155763/Test.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs153/pr155763/Test.java b/tests/bugs153/pr155763/Test.java new file mode 100644 index 000000000..2cc42f0cc --- /dev/null +++ b/tests/bugs153/pr155763/Test.java @@ -0,0 +1,31 @@ +import java.util.List; + +public class Test { + + public boolean method(final MyInterface iface) { + for(final String s:iface.listFile()) if(s.equals("blah")) { + System.out.println("Test.method()"); + continue; + } + return false; + } + + public void notCalledMethod() { + } + +} + +interface MyInterface { + + public abstract List<String> listFile(); +} + +aspect MyAspect { + + pointcut p() : call(public * Test.notCalledMethod()); + + before() : p() { + System.out.println("calling method"); + } + +} |