Quite often I have code like this:

if (blaa==plaa) {
  //do something
  return;
}

Now when I try to "extract method", IDEA complains about multiple exit points.
Well, IDEA should simply add a new return value to control the flow, like this:

if (myExtractedMethod()) return;

//...

private boolean myExtractedMethod() {
  if (blaa==plaa) {
    //do something
    return true;
  }
  return false;
}

Now I have to do this kind of refactoring by hand rather often.


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features

Reply via email to