langtools/test/tools/javac/warnings/6594914/T6594914b.java
author chegar
Tue, 13 Oct 2015 09:02:30 +0100
changeset 33021 8a0d5889acea
parent 30730 d3ce7619db2c
permissions -rw-r--r--
8139371: Three langtools test failures after the removal of sun.misc.Lock Reviewed-by: jjg, mchung

/**
 * @test /nodynamiccopyright/
 * @bug 6594914
 * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable
 * @modules java.base/sun.security.x509
 * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java
 */


class T6747671b {

    sun.security.x509.X509CertInfo a1; //warn

    @SuppressWarnings("sunapi")
    sun.security.x509.X509CertInfo a2;

    <X extends sun.security.x509.X509CertInfo>
    sun.security.x509.X509CertInfo m1(sun.security.x509.X509CertInfo a)
            throws sun.security.x509.CertException { return null; } //warn

    @SuppressWarnings("sunapi")
    <X extends sun.security.x509.X509CertInfo>
    sun.security.x509.X509CertInfo m2(sun.security.x509.X509CertInfo a)
            throws sun.security.x509.CertException { return null; }

    void test() {
        sun.security.x509.X509CertInfo a1; //warn

        @SuppressWarnings("sunapi")
        sun.security.x509.X509CertInfo a2;
    }
}