class Test { void foo() { final String str = ""; if (str == "a") { return; } new Runnable() { public void run() { System.out.println(str); } } } }