Sat, 07 Nov 2020 10:30:02 +0800
Added tag mips-jdk8u275-b01 for changeset eb6ee6a5f2fe
aoqi@0 | 1 | /** |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 6594914 |
aoqi@0 | 4 | * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable |
aoqi@0 | 5 | * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | |
aoqi@0 | 8 | |
aoqi@0 | 9 | class T6747671b { |
aoqi@0 | 10 | |
aoqi@0 | 11 | sun.misc.Lock a1; //warn |
aoqi@0 | 12 | |
aoqi@0 | 13 | @SuppressWarnings("sunapi") |
aoqi@0 | 14 | sun.misc.Lock a2; |
aoqi@0 | 15 | |
aoqi@0 | 16 | <X extends sun.misc.Lock> sun.misc.Lock m1(sun.misc.Lock a) |
aoqi@0 | 17 | throws sun.misc.CEFormatException { return null; } //warn |
aoqi@0 | 18 | |
aoqi@0 | 19 | @SuppressWarnings("sunapi") |
aoqi@0 | 20 | <X extends sun.misc.Lock> sun.misc.Lock m2(sun.misc.Lock a) |
aoqi@0 | 21 | throws sun.misc.CEFormatException { return null; } |
aoqi@0 | 22 | |
aoqi@0 | 23 | void test() { |
aoqi@0 | 24 | sun.misc.Lock a1; //warn |
aoqi@0 | 25 | |
aoqi@0 | 26 | @SuppressWarnings("sunapi") |
aoqi@0 | 27 | sun.misc.Lock a2; |
aoqi@0 | 28 | } |
aoqi@0 | 29 | } |