You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class OriginalClass {
public void foo() {
Object runnable= null;
Object[] disposeList= null;
for (int i=0; i < disposeList.length; i++) {
if (disposeList [i] == null) {
disposeList [i] = runnable;
// extract method
return;
}
}
}
}
refactoring result:
Reason: The extraction method does not contain a return statement. If inline refactoring is performed on the extraction method, the behavior of the statement before and after refactoring is inconsistent.
Expected behavior: Check for statements like return, provide a prompt before refactoring, and do not allow extraction method refactoring.
The text was updated successfully, but these errors were encountered:
[provide a description of the issue]
Environment
Steps to Reproduce:
public class OriginalClass {
public void foo() {
Object runnable= null;
Object[] disposeList= null;
for (int i=0; i < disposeList.length; i++) {
if (disposeList [i] == null) {
disposeList [i] = runnable;
// extract method
return;
}
}
}
}
refactoring result:
Reason: The extraction method does not contain a return statement. If inline refactoring is performed on the extraction method, the behavior of the statement before and after refactoring is inconsistent.
Expected behavior: Check for statements like return, provide a prompt before refactoring, and do not allow extraction method refactoring.
The text was updated successfully, but these errors were encountered: