Community
Participate
Working Groups
I want an option to extract local variable only in nearest enclosing block, for example in the following the code, allow to change only inside if statements: if (myState.equals(STATE_ONE){ if (myObj.getStatus() == ONE || myObj.getStatus() == TWO ) { } myObj.changeMe(); } if (myObj.getStatus() == THREE || myObj.getStatus() == FOUR) { } myObj.changeMe2();
First asked on Stack Overflow: https://stackoverflow.com/q/52137330