-
Notifications
You must be signed in to change notification settings - Fork 8
/
Sample.java
29 lines (24 loc) · 855 Bytes
/
Sample.java
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
package ann;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
import java.nio.file.Paths;
import java.util.concurrent.Callable;
@IgnoreJRERequirement
public class Sample {
public static void main(String[] args) {
// method added in 1.7
Boolean.compare(true, true);
}
public String someth() throws Exception {
// this will compile as separate class file and animalsniffer check order would be important
// (enclosed class must be checked first to apply annotataion)
// https://github.com/xvik/gradle-animalsniffer-plugin/issues/25
return new Callable<String>() {
@Override
public String call() throws Exception {
// class added in 1.7
Paths.get("/tmp");
return "ok";
}
}.call();
}
}