summaryrefslogtreecommitdiffstats
path: root/tests/bugs153
diff options
context:
space:
mode:
authoraclement <aclement>2006-09-11 16:59:56 +0000
committeraclement <aclement>2006-09-11 16:59:56 +0000
commit018b33eab8e607e54b65752cc65a25b66e1a0e91 (patch)
tree5a5ea9c35fc54d5ef6c4f9ff6ceeb4217f222d50 /tests/bugs153
parente5b2cd7148abec67d52132a9cddb9aea91acc9a1 (diff)
downloadaspectj-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.java31
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");
+ }
+
+}