summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2008-02-06 20:27:15 +0000
committeraclement <aclement>2008-02-06 20:27:15 +0000
commit5d3d1983a043a2d7011e2f54cce63fb511fde335 (patch)
treeaddaf855e38ff2eda448bc2a3d7fde182cc80313 /tests
parent3690f9d8a3589a77854cb1e45ebfdca8d439dfe8 (diff)
downloadaspectj-5d3d1983a043a2d7011e2f54cce63fb511fde335.tar.gz
aspectj-5d3d1983a043a2d7011e2f54cce63fb511fde335.zip
remove unwanted xlint for parameter annotations
Diffstat (limited to 'tests')
-rw-r--r--tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java17
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ParameterAnnotationMatchingTests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/parameterAnnotations.xml5
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java b/tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java
new file mode 100644
index 000000000..872ea644a
--- /dev/null
+++ b/tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java
@@ -0,0 +1,17 @@
+import java.lang.annotation.*;
+
+public aspect NonNullAssertionForcer {
+
+ class C {
+ public void foo(@NonNull String s) {}
+ }
+
+ before(): execution(* *(@NonNull (*))) {
+ System.out.println("Bar");
+ }
+
+ @Target(ElementType.PARAMETER)
+ @interface NonNull {
+
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ParameterAnnotationMatchingTests.java b/tests/src/org/aspectj/systemtest/ajc160/ParameterAnnotationMatchingTests.java
index 0f224dd85..97e6c9222 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ParameterAnnotationMatchingTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/ParameterAnnotationMatchingTests.java
@@ -76,6 +76,7 @@ import junit.framework.Test;
*/
public class ParameterAnnotationMatchingTests extends XMLBasedAjcTestCase {
+ public void testNoWarningForWrongType() { runTest("no xlint for wrong target");}
public void testVariousCombinations() { runTest("various combinations"); }
public void testVariousCombinationsCtors() { runTest("various combinations - ctors"); }
public void testHasMethod() { runTest("hasmethod"); }
diff --git a/tests/src/org/aspectj/systemtest/ajc160/parameterAnnotations.xml b/tests/src/org/aspectj/systemtest/ajc160/parameterAnnotations.xml
index 560ffa585..540307665 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/parameterAnnotations.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/parameterAnnotations.xml
@@ -3,6 +3,11 @@
<!-- AspectJ v1.6.0 Parameter Annotation Matching Tests -->
<suite>
+
+ <ajc-test dir="features160/parameterAnnotationMatching" title="no xlint for wrong target">
+ <compile options="-1.5" files="NonNullAssertionForcer.java"/>
+ </ajc-test>
+
<ajc-test dir="features160/parameterAnnotationMatching" title="various combinations">
<compile options="-1.5 -showWeaveInfo" files="TestMatching.aj Anno1.java Anno2.java AnnotatedWithAnno1.java AnnotatedWithAnno2.java">
<message kind="weave" text="'TestMatching' (TestMatching.aj:4) advised by before advice from 'TestMatching' (TestMatching.aj:3)"/>