diff -r 5d924959cd81 -r e1ed8c9e12e5 langtools/test/tools/javac/typeAnnotations/failures/LintCast.java --- a/langtools/test/tools/javac/typeAnnotations/failures/LintCast.java Fri Nov 05 09:32:08 2010 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -import java.util.List; - -/* - * @test /nodynamiccopyright/ - * @bug 6843077 - * @summary test that compiler doesn't warn about annotated redundant casts - * @author Mahmood Ali - * @compile/ref=LintCast.out -Xlint:cast -XDrawDiagnostics -source 1.7 LintCast.java - */ -class LintCast { - void unparameterized() { - String s = "m"; - String s1 = (String)s; - String s2 = (@A String)s; - } - - void parameterized() { - List l = null; - List l1 = (List)l; - List l2 = (List<@A String>)l; - } - - void array() { - int @A [] a = null; - int[] a1 = (int[])a; - int[] a2 = (int @A [])a; - } - - void sameAnnotations() { - @A String annotated = null; - String unannotated = null; - - // compiler ignore annotated casts even if redundant - @A String anno1 = (@A String)annotated; - - // warn if redundant without an annotation - String anno2 = (String)annotated; - String unanno2 = (String)unannotated; - } -} - -@interface A { }