]> source.dussan.org Git - aspectj.git/commitdiff
272233: test and fix, using 'void<?>'
authoraclement <aclement>
Thu, 16 Apr 2009 19:17:51 +0000 (19:17 +0000)
committeraclement <aclement>
Thu, 16 Apr 2009 19:17:51 +0000 (19:17 +0000)
tests/bugs165/pr272233/Iffy.java [new file with mode: 0644]
tests/bugs165/pr272233/Iffy2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc165/Ajc165Tests.java
tests/src/org/aspectj/systemtest/ajc165/ajc165.xml

diff --git a/tests/bugs165/pr272233/Iffy.java b/tests/bugs165/pr272233/Iffy.java
new file mode 100644 (file)
index 0000000..dc0f88c
--- /dev/null
@@ -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 (file)
index 0000000..15a5d79
--- /dev/null
@@ -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;
+  }
+}
index d313400a07e51c8c8f5481b85a3fe8f4d7fefbee..ccad2d7dee775fd1869fb5d1dd9e6adbdf5be709 100644 (file)
@@ -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();
index aa237128889a731346fc70c4e503711b89f39a7a..42a99cd1be889a011ea1f98f71676a782b754125 100644 (file)
@@ -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"/>