mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
EA-33530 - AIOOBE: ExtractMethodProcessor.doExtract
This commit is contained in:
@@ -509,6 +509,11 @@ public class ExtractMethodProcessor implements MatchProvider {
|
||||
myVariableDatum[i] = myInputVariables.getInputVariables().get(i);
|
||||
}
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
public void doNotPassParameter(int i) {
|
||||
myVariableDatum[i].passAsParameter = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked in command and in atomic action
|
||||
@@ -760,6 +765,7 @@ public class ExtractMethodProcessor implements MatchProvider {
|
||||
|
||||
for (int i = 0, length = myVariableDatum.length; i < length; i++) {
|
||||
ParameterTablePanel.VariableData data = myVariableDatum[i];
|
||||
if (!data.passAsParameter) continue;
|
||||
final PsiVariable variable = data.variable;
|
||||
final PsiParameter psiParameter = newMethod.getParameterList().getParameters()[i];
|
||||
if (!TypeConversionUtil.isAssignable(variable.getType(), psiParameter.getType())) {
|
||||
|
||||
Reference in New Issue
Block a user