aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2009-04-16 19:17:51 +0000
committeraclement <aclement>2009-04-16 19:17:51 +0000
commit43d34f58ff0ee4c9e36ccc083e3c73d22b7c928d (patch)
treeb707075d72408bae643a549d291f0e6315bfba0d
parentbb741e6b112e6f3dff5ea53e1e42956a0418c74e (diff)
downloadaspectj-43d34f58ff0ee4c9e36ccc083e3c73d22b7c928d.tar.gz
aspectj-43d34f58ff0ee4c9e36ccc083e3c73d22b7c928d.zip
272233: test and fix, using 'void<?>'
-rw-r--r--tests/bugs165/pr272233/Iffy.java21
-rw-r--r--tests/bugs165/pr272233/Iffy2.java16
-rw-r--r--tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc165/ajc165.xml13
4 files changed, 58 insertions, 0 deletions
diff --git a/tests/bugs165/pr272233/Iffy.java b/tests/bugs165/pr272233/Iffy.java
new file mode 100644
index 000000000..dc0f88c40
--- /dev/null
+++ b/tests/bugs165/pr272233/Iffy.java
@@ -0,0 +1,21 @@
+import java.util.*;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+class A {
+@Pointcut("execution(!void<?>[] *(..))")
+void pointCutError() {}
+
+ @Before("pointCutError()")
+ public void m() {}
+}
+
+
+public class Iffy {
+
+
+public Collection<?>[] getCollectionArray() {
+ return null;
+}
+
+}
diff --git a/tests/bugs165/pr272233/Iffy2.java b/tests/bugs165/pr272233/Iffy2.java
new file mode 100644
index 000000000..15a5d79fd
--- /dev/null
+++ b/tests/bugs165/pr272233/Iffy2.java
@@ -0,0 +1,16 @@
+import java.util.*;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+class Iffy2 {
+
+ @Before("execution(!void[] *(..))")
+ public void advice1() {}
+
+ @Before("execution(!void[] *(..))")
+ public void advice2() {}
+
+ public Collection<?>[] getCollectionArray() {
+ return null;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java b/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java
index d313400a0..ccad2d7de 100644
--- a/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java
@@ -20,6 +20,14 @@ import org.aspectj.weaver.LintMessage;
public class Ajc165Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testFunkyPointcut_pr272233() {
+ runTest("funky pointcut");
+ }
+
+ public void testFunkyPointcut_pr272233_2() {
+ runTest("funky pointcut 2");
+ }
+
public void testAnnotationStyle_pr265356() {
runTest("annotation style message positions");
List ms = ajc.getLastCompilationResult().getWarningMessages();
diff --git a/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml b/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml
index aa2371288..42a99cd1b 100644
--- a/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml
+++ b/tests/src/org/aspectj/systemtest/ajc165/ajc165.xml
@@ -2,6 +2,19 @@
<suite>
+ <ajc-test dir="bugs165/pr272233" title="funky pointcut">
+ <compile files="Iffy.java" options="-1.5">
+ <message kind="warning" text="void is not a generic type"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs165/pr272233" title="funky pointcut 2">
+ <compile files="Iffy2.java" options="-1.5 -showWeaveInfo">
+ <message kind="weave" text="advised by before advice from 'Iffy2' (Iffy2.java:11)"/>
+ <message kind="weave" text="advised by before advice from 'Iffy2' (Iffy2.java:8)"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs165/pr265356" title="annotation style message positions">
<compile files="Main.java" options="-1.5">
<message kind="warning" line="11"/>