From 5d3d1983a043a2d7011e2f54cce63fb511fde335 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 6 Feb 2008 20:27:15 +0000 Subject: [PATCH] remove unwanted xlint for parameter annotations --- .../NonNullAssertionForcer.java | 17 +++++++++++++++++ .../ParameterAnnotationMatchingTests.java | 1 + .../systemtest/ajc160/parameterAnnotations.xml | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 tests/features160/parameterAnnotationMatching/NonNullAssertionForcer.java 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 @@ + + + + + -- 2.39.5