This goes along with Inline Method with "returns interrupting the
control flow" error.
I have this
public int foo(int i) {
...
if (i < 0) return 0;
return i;
}
With 611 I can do this by extracting the 2 last lines of foo
public int foo(int i) {
return bar(i);
}
private int bar(int i) {
if (i < 0) return 0;
return i;
}
But I cannot inline bar back !
The problem is simple though. If a method returns something else then
void you have to convert the return an assignment of a result variable.
public int foo(int i) {
...
int res = 0;
if (i < 0) res = 0;
res = i;
return res;
}
Am I missing something?
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features