extract method: suggest non-void return type if final field is assigned inside (IDEA-93737)

This commit is contained in:
Anna Kozlova
2014-12-04 13:43:01 +01:00
parent ad726d0abc
commit e2e8384516
4 changed files with 66 additions and 17 deletions
@@ -0,0 +1,10 @@
class X {
private final int i;
public X() {
<selection>
i = 0;
System.out.println(i);
</selection>
}
}
@@ -0,0 +1,16 @@
class X {
private final int i;
public X() {
i = newMethod();
}
private int newMethod() {
int i;
i = 0;
System.out.println(i);
return i;
}
}