blob: 93fcf6d5c2d2e78f79078e18f332106590e08d96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
class Test {
public static void foo() {
String result = null;
try {
result = createString();
}
catch (Exception e) {
Assert.fail();
}
finally {
if (result == null) {
System.out.println("Analysis failed!");
}
}
}
private static @NotNull String createString() {
throw new NullPointerException();
}
}
|