mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-27366 - NPE: ExtractMethodProcessor.processMatch
(cherry picked from commit e1c2bbc461d68db1bd2986946449fa7875c725a8)
This commit is contained in:
+4
-2
@@ -877,8 +877,10 @@ public class ExtractMethodProcessor implements MatchProvider {
|
||||
}
|
||||
for (ParameterTablePanel.VariableData data : datas) {
|
||||
final List<PsiElement> parameterValue = match.getParameterValues(data.variable);
|
||||
for (PsiElement val : parameterValue) {
|
||||
methodCallExpression.getArgumentList().add(val);
|
||||
if (parameterValue != null) {
|
||||
for (PsiElement val : parameterValue) {
|
||||
methodCallExpression.getArgumentList().add(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
return match.replace(myExtractedMethod, methodCallExpression, myOutputVariable);
|
||||
|
||||
@@ -71,6 +71,7 @@ public final class Match {
|
||||
return myMatchEnd;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<PsiElement> getParameterValues(PsiVariable parameter) {
|
||||
return myParameterValues.get(parameter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user