change signature: move declarations out of try/catch block (IDEA-169213)

This commit is contained in:
Anna.Kozlova
2017-03-07 14:32:25 +01:00
parent 2769981fb1
commit af59ff1487
5 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,8 @@
class Test {
int <caret>foo() throws IllegalArgumentException { return 1;}
void fooBar() throws IllegalArgumentException{
int a = foo();
System.out.println(a);
}
}

View File

@@ -0,0 +1,13 @@
class Test {
int foo() throws Exception { return 1;}
void fooBar() throws IllegalArgumentException{
int a = 0;
try {
a = foo();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(a);
}
}