extract method: exclude return statements without value from occurrence analyzing; do not suggest artificial return type if return statements break control flow

This commit is contained in:
Anna Kozlova
2014-12-05 19:21:40 +01:00
parent 5dece3bd80
commit f7316391ce
4 changed files with 24 additions and 2 deletions
@@ -0,0 +1,7 @@
class X {
void foo() {
<selection>if (true) return;
System.out.println();
</selection>
}
}
@@ -0,0 +1,11 @@
class X {
void foo() {
newMethod();
}
private int newMethod() {
if (true) return;
System.out.println();
}
}