File: T6594914b.java

package info (click to toggle)
libnb-javaparser-java 7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 35,940 kB
  • ctags: 55,696
  • sloc: java: 264,137; xml: 2,781; sh: 1,135; makefile: 425
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;
    }
}