test/tools/javac/warnings/6885255/T6885255.java

Wed, 01 Dec 2010 11:02:38 -0800

author
bpatel
date
Wed, 01 Dec 2010 11:02:38 -0800
changeset 766
90af8d87741f
parent 0
959103a6100f
permissions
-rw-r--r--

6851834: Javadoc doclet needs a structured approach to generate the output HTML.
Reviewed-by: jjg

     1 /**
     2  * @test /nodynamiccopyright/
     3  * @bug 6885255
     4  * @summary -Xlint:rawtypes
     5  * @compile/ref=T6885255.out -XDrawDiagnostics -Xlint:rawtypes T6885255.java
     6  */
     8 class T6885255 {
    10     static class Test<X, Y> {}
    12     Class<Test> ct; //no warn - outer Class w/ raw param
    13     Class<Test<Test, Test>> ctt; //warn - outer Class w/o raw param (2)
    15     Class<Class<Test>> cct; //warn - outer Class w/o raw param
    16     Class<Class<Test<Test, Test>>> cctt; //warn - outer Class w/o raw param (2)
    18     Object o1 = (Test)null; //no warn - outer raw and cast
    19     Object o2 = (Test<Test, Test>)null; //warn - inner raw (2)
    21     Object o3 = (Class)null; //no warn - outer raw and cast
    22     Object o4 = (Class<Test>)null; //no warn - outer Class w/ raw param
    24     Object o5 = (Class<Test<Test, Test>>)null; //warn - outer Class w/ non raw param (2)
    25     Object o6 = (Class<Class<Test<Test, Test>>>)null; //warn - outer Class w/ non raw param (2)
    27     Object o7 = (Test<Class, Class>)null; //warn - inner raw (2)
    28     Object o8 = (Test<Class<Test>, Class<Test>>)null; //warn - inner Class (2)
    30     boolean b = null instanceof Test; //no warn - raw and instanceof
    31 }

mercurial