File: T6594914b.java

package info (click to toggle)
libnb-javaparser-java 7.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,688 kB
  • sloc: java: 189,590; sh: 3,082; xml: 2,085; makefile: 379
file content (29 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
 * @test /nodynamiccopyright/
 * @bug 6594914
 * @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable
 * @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java
 */


class T6747671b {

    sun.misc.Lock a1; //warn

    @SuppressWarnings("sunapi")
    sun.misc.Lock a2;

    <X extends sun.misc.Lock> sun.misc.Lock m1(sun.misc.Lock a)
            throws sun.misc.CEFormatException { return null; } //warn

    @SuppressWarnings("sunapi")
    <X extends sun.misc.Lock> sun.misc.Lock m2(sun.misc.Lock a)
            throws sun.misc.CEFormatException { return null; }

    void test() {
        sun.misc.Lock a1; //warn

        @SuppressWarnings("sunapi")
        sun.misc.Lock a2;
    }
}