Debian Codegraph @

checker/tests/nullness/init/Uninit12.java

raw
1 // This is a test case for issue #105:
2 // https://github.com/typetools/checker-framework/issues/105
3
4 import org.checkerframework.checker.nullness.qual.*;
5
6 // :: error: (initialization.static.fields.uninitialized)
7 public class Uninit12 {
8
9 static Object f;
10
11 public Uninit12() {
12 f.toString();
13 }
14
15 static Object g = new Object();
16
17 static Object h;
18
19 static {
20 h = new Object();
21 }
22 }
23
24 class Uninit12_OK {
25
26 static Object g = new Object();
27
28 static Object h;
29
30 static {
31 h = new Object();
32 }
33 }