class Tester { String callee(String x) { if (x == null) { return null; } return x; } void caller(String v) { String g = callee(v); System.out.println(g); } }
Try to inline callee(). IDEA says it's not possible, but in fact it is:
class Tester { void caller(String v) { String g; if (v == null) { g = null; } else { g = v; } System.out.println(g); } }