aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-09-14 17:32:19 +0000
committeraclement <aclement>2005-09-14 17:32:19 +0000
commit441f1cc722a196c3ea7b48276351531e52aaaaf6 (patch)
tree005000b7adbac9fbc6b26b47fba6c8fd0a2b3e14 /tests
parent9810a3c335bdb732458a46c7965599b0cc93238e (diff)
downloadaspectj-441f1cc722a196c3ea7b48276351531e52aaaaf6.tar.gz
aspectj-441f1cc722a196c3ea7b48276351531e52aaaaf6.zip
test for pr102210
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/PR102210.java34
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml16
3 files changed, 50 insertions, 1 deletions
diff --git a/tests/bugs150/PR102210.java b/tests/bugs150/PR102210.java
new file mode 100644
index 000000000..3c1046507
--- /dev/null
+++ b/tests/bugs150/PR102210.java
@@ -0,0 +1,34 @@
+import java.util.*;
+
+public aspect PR102210 {
+
+ pointcut complex(List list):
+ (execution(public * *(String, List)) && args(*,list)) ||
+ (execution(public * *(String, List, String)) && args(*,list,*)) ||
+ (execution(public * *(String, String[], List, String)) && args(*,*,list,*));
+
+ before(List l): complex(l) {
+ System.err.println("List size is "+l.size());
+ }
+
+ public static void main(String []argv) {
+ List l = new ArrayList();
+ l.add(".");
+ m1("xxx",l);
+ l.add(".");
+ m2("xxx",l,"yyy");
+ l.add(".");
+ m3("xxx",new String[]{"xxx","yyy"},l,"zzz");
+ }
+
+ public static void m1(String a,List b) {
+ System.err.println("m1 running");
+ }
+ public static void m2(String a,List b,String c) {
+ System.err.println("m2 running");
+ }
+ public static void m3(String a,String[] b,List c,String d) {
+ System.err.println("m3 running");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index b657a7cfd..dd59979fb 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -195,6 +195,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testSyntaxErrorNPE_pr103266() {runTest("NPE on syntax error");}
public void testFinalAbstractClass_pr109486() { runTest("Internal compiler error (ClassParser.java:242)");}
+ //public void testComplexBinding_pr102210() { runTest("NullPointerException trying to compile");}
public void testIllegalStateExceptionOnNestedParameterizedType_pr106634() {
runTest("IllegalStateException unpacking signature of nested parameterized type");
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index a33a914df..5f696d89f 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -70,7 +70,21 @@
<ajc-test dir="bugs150" pr="107486" title="anonymous inner classes">
<compile files="pr107486.aj">
</compile>
- </ajc-test>
+ </ajc-test>
+
+ <ajc-test dir="bugs150" pr="102210" title="NullPointerException trying to compile">
+ <compile files="PR102210.java"/>
+ <run class="PR102210">
+ <stderr>
+ <line text="List size is 1"/>
+ <line text="m1 running"/>
+ <line text="List size is 2"/>
+ <line text="m2 running"/>
+ <line text="List size is 3"/>
+ <line text="m3 running"/>
+ </stderr>
+ </run>
+ </ajc-test>
<ajc-test dir="bugs150" pr="107486" title="multiple anonymous inner classes">
<compile files="pr107486part2.aj">