Files
openide/java/java-tests/testData/refactoring/extractMethodNew/UseVarInCatchInvisible.java
Alexandr Suhinin 0e860160e5 [extract method] fork tests
GitOrigin-RevId: 3aae5c738d48c38144f6a78c36738121831ae5a5
2020-03-31 12:32:01 +00:00

18 lines
426 B
Java

class A {
void foo() {
String s = null;
try {
s = "1";
<selection>int invisibleOutsideTry = 1 + 1;
bar();</selection>
s = s + invisibleOutsideTry;
} catch (Exception e) {
System.out.println("ex " + s);
}
System.out.println("ok " + s);
}
private void bar() throws Exception {
throw new Exception();
}
}