mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
change signature: move declarations out of try/catch block (IDEA-169213)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
class Test {
|
||||
int <caret>foo() throws IllegalArgumentException { return 1;}
|
||||
|
||||
void fooBar() throws IllegalArgumentException{
|
||||
int a = foo();
|
||||
System.out.println(a);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user