diff options
author | Martoko | 2018-12-24 01:15:23 +0100 |
---|---|---|
committer | Martoko | 2018-12-24 13:33:17 +0100 |
commit | 54fab328d6be7868cc689d6bdc8be272e69ed6fa (patch) | |
tree | 529e46608fb33a745fd76bcc33e5f0e38e9cd65f /PassingTest.java | |
download | aur-54fab328d6be7868cc689d6bdc8be272e69ed6fa.tar.gz |
Initial commit
Diffstat (limited to 'PassingTest.java')
-rw-r--r-- | PassingTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/PassingTest.java b/PassingTest.java new file mode 100644 index 000000000000..4d43ee573df3 --- /dev/null +++ b/PassingTest.java @@ -0,0 +1,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(); + } +} |