]> source.dussan.org Git - aspectj.git/commitdiff
remove unwanted xlint for parameter annotations
authoraclement <aclement>
Wed, 6 Feb 2008 20:27:15 +0000 (20:27 +0000)
committeraclement <aclement>
Wed, 6 Feb 2008 20:27:15 +0000 (20:27 +0000)
tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/ParameterAnnotationMatchingTests.java
tests/src/org/aspectj/systemtest/ajc160/parameterAnnotations.xml

diff --git a/tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java b/tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java
new file mode 100644 (file)
index 0000000..872ea64
--- /dev/null
@@ -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 {
+               
+       }
+}
index 0f224dd85ac5e4594f796290e2cd869f62959cfc..97e6c92227675a703e494b11a310d6b5fbae3b75 100644 (file)
@@ -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"); }
index 560ffa585d77b1a1826b263f0558c45b07c136c5..540307665c3ed5e86f112a780f564e62e8ed29f9 100644 (file)
@@ -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)"/>