From: acolyer Date: Fri, 19 Aug 2005 19:18:31 +0000 (+0000) Subject: test for pr104529, @SuppressWarnings("unchecked") not being honored X-Git-Tag: V1_5_0M3~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7b325703558284f5dbf21c5e94b1ffc76e4e382c;p=aspectj.git test for pr104529, @SuppressWarnings("unchecked") not being honored --- diff --git a/tests/bugs150/pr104529.aj b/tests/bugs150/pr104529.aj new file mode 100644 index 000000000..ddec2dcc0 --- /dev/null +++ b/tests/bugs150/pr104529.aj @@ -0,0 +1,19 @@ +import java.util.*; +public class pr104529 { + + /* + * AJDT is ignoring the @SuppressWarnings( "unchecked" ) annotation. It is giving + * me a type safety warning when I don't specify the type when declaring a generic + * even though I have the @SuppressWarnings( "unchecked" ) annotation specified. + */ + + void unsuppressed() { + List l = new ArrayList(); + } + + @SuppressWarnings("unchecked") + void suppressed() { + List l = new ArrayList(); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index f4ed350fa..cfd7a5fc3 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -242,6 +242,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("overriding final pointcut from super-aspect"); } + public void testAtSuppressWarnings() { + runTest("@SuppressWarnings should suppress"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index da8d9e661..f8e1a2e7a 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -91,6 +91,13 @@ + + + + + + +