1 /** 2 * @test /nodynamiccopyright/ 3 * @bug 6594914 4 * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable 5 * @modules java.base/sun.misc 6 * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java 7 */ 8 9 10 class T6747671b { 11 12 sun.misc.Lock a1; //warn 13 14 @SuppressWarnings("sunapi") 15 sun.misc.Lock a2; 16 17 <X extends sun.misc.Lock> sun.misc.Lock m1(sun.misc.Lock a) 18 throws sun.misc.CEFormatException { return null; } //warn 19 20 @SuppressWarnings("sunapi") 21 <X extends sun.misc.Lock> sun.misc.Lock m2(sun.misc.Lock a) 22 throws sun.misc.CEFormatException { return null; } 23 24 void test() { 25 sun.misc.Lock a1; //warn 26 27 @SuppressWarnings("sunapi") 28 sun.misc.Lock a2; 29 } 30 } | 1 /** 2 * @test /nodynamiccopyright/ 3 * @bug 6594914 4 * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable 5 * @modules java.base/sun.security.x509 6 * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java 7 */ 8 9 10 class T6747671b { 11 12 sun.security.x509.X509CertInfo a1; //warn 13 14 @SuppressWarnings("sunapi") 15 sun.security.x509.X509CertInfo a2; 16 17 <X extends sun.security.x509.X509CertInfo> 18 sun.security.x509.X509CertInfo m1(sun.security.x509.X509CertInfo a) 19 throws sun.security.x509.CertException { return null; } //warn 20 21 @SuppressWarnings("sunapi") 22 <X extends sun.security.x509.X509CertInfo> 23 sun.security.x509.X509CertInfo m2(sun.security.x509.X509CertInfo a) 24 throws sun.security.x509.CertException { return null; } 25 26 void test() { 27 sun.security.x509.X509CertInfo a1; //warn 28 29 @SuppressWarnings("sunapi") 30 sun.security.x509.X509CertInfo a2; 31 } 32 } |