summarylogtreecommitdiffstats
path: root/PassingTest.java
blob: 4d43ee573df372c2aa9e6013ceb536c2b2e01c3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class PassingTest {
  String mayReturnNull(int i) {
    if (i > 0) {
      return "Hello, Infer!";
    }
    return null;
  }
  int mayCauseNPE() {
    String s = mayReturnNull(0);
    return s == null ? 0 : s.length();
  }
}