IDEA-104754 Good code yellow: Unboxing

This commit is contained in:
peter
2013-07-31 17:49:44 +02:00
parent 9795fd2dc7
commit 9329331182
3 changed files with 18 additions and 0 deletions
@@ -0,0 +1,14 @@
import org.jetbrains.annotations.Nullable;
class Baz {
Integer bar() { return 2; }
void g() {
@Nullable Integer foo = bar();
if (foo == null) {
foo = 0;
}
System.out.println(foo.intValue());
}
}