aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs163/pr253109/CodeFour.java13
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml5
-rw-r--r--tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc163/ajc163.xml6
4 files changed, 29 insertions, 3 deletions
diff --git a/tests/bugs163/pr253109/CodeFour.java b/tests/bugs163/pr253109/CodeFour.java
new file mode 100644
index 000000000..729ad8837
--- /dev/null
+++ b/tests/bugs163/pr253109/CodeFour.java
@@ -0,0 +1,13 @@
+import java.util.*;
+
+public aspect CodeFour {
+
+ static final class FinalSet<T> extends HashSet<T> {}
+
+ before(): execution(* *(..)) && args(List<?>) {}
+
+ public void m(FinalSet<String> ss) {
+ // List<?> l = (List<?>)ss; // cannot write this (FinalSet is final) so pointcut should not match
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 67ca6e191..1e878b860 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -5408,7 +5408,7 @@
</ajc-test>
<ajc-test dir="java5/generics/pointcuts" title="args with generic wildcard">
- <compile files="ArgsListOfSomething.aj" options="-1.5">
+ <compile files="ArgsListOfSomething.aj" options="-1.5 -Xlint:ignore">
</compile>
<run class="ArgsListOfSomething">
<stdout>
@@ -5536,6 +5536,9 @@
<ajc-test dir="java5/generics/afterAdvice" title="after returning with generic wildcard">
<compile files="AfterReturningListOfSomething.aj" options="-1.5">
+ <!-- warning is unchecked match of List<?> from line 28 onto line 15. -->
+ <!-- some sets may be lists unless the set is final, so as a cast is allowed, the match is allowed -->
+ <message kind="warning" line="28"/>
</compile>
<run class="AfterReturningListOfSomething">
<stdout>
diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
index 3641fcd51..8818ef5d9 100644
--- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
@@ -22,7 +22,7 @@ import org.aspectj.testing.Utils;
import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
-/*
+
public void testGenericPointcuts_1() {
runTest("generic pointcuts - 1");
}
@@ -34,7 +34,11 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testGenericPointcuts_3() {
runTest("generic pointcuts - 3");
}
-*/
+
+ public void testGenericPointcuts_4() {
+ runTest("generic pointcuts - 4");
+ }
+
// public void testBrokenLVT_pr194314_1() throws Exception {
// runTest("broken lvt - 1");
// JavaClass jc = Utils.getClassFrom(ajc.getSandboxDirectory().getAbsolutePath(), "Service");
diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml
index 6fcc6166a..af8154154 100644
--- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml
+++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml
@@ -25,6 +25,12 @@
<message kind="warning" line="9" text="unchecked"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs163/pr253109" title="generic pointcuts - 4">
+ <compile files="CodeFour.java" options="-1.5">
+ <message kind="warning" text="has not been applied"/>
+ </compile>
+ </ajc-test>
<ajc-test dir="bugs163/pr194314" title="broken lvt - 1">
<compile files="Service.java IService.java Main.java ServiceInterceptor.java" options="-1.5"/>