langtools/test/tools/javac/T6394563.java
author jeff
Wed, 22 Jun 2011 10:10:54 -0700
changeset 9916 c35ecac744a5
parent 6150 d055fa8ced62
child 22444 c79ee1e6742f
permissions -rw-r--r--
7057046: Add embedded license to THIRD PARTY README Reviewed-by: lana

/*
 * @test  /nodynamiccopyright/
 * @bug 6394563
 * @summary javac ignores -nowarn switch in 1.5.0_06 for deprecation warnings
 *
 * @compile/ref=T6394563.note.out  -XDrawDiagnostics -nowarn             T6394563.java
 * @compile/ref=T6394563.note.out  -XDrawDiagnostics -nowarn -source 1.5 T6394563.java
 * @compile/ref=T6394563.empty.out -XDrawDiagnostics -nowarn -source 1.4 T6394563.java
 *
 * @compile/ref=T6394563.warn.out  -XDrawDiagnostics -Xlint -nowarn             T6394563.java
 * @compile/ref=T6394563.warn.out  -XDrawDiagnostics -Xlint -nowarn -source 1.5 T6394563.java
 * @compile/ref=T6394563.empty.out -XDrawDiagnostics -Xlint -nowarn -source 1.4 T6394563.java
 */

class T6394563 {
    void useDeprecated() {
        deprecated.foo();
    }
}

class deprecated {
    /** @deprecated */ static void foo() { }
}