mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed potential NPE
This commit is contained in:
@@ -252,15 +252,18 @@ public class PyNamedParameterImpl extends PyPresentableElementImpl<PyNamedParame
|
||||
@Override
|
||||
public boolean process(@NotNull PyCallExpression call) {
|
||||
final PyResolveContext resolveContext = PyResolveContext.noImplicits().withTypeEvalContext(context);
|
||||
final CallArgumentsMapping mapping = call.getArgumentList().analyzeCall(resolveContext);
|
||||
for (Map.Entry<PyExpression, PyNamedParameter> entry : mapping.getPlainMappedParams().entrySet()) {
|
||||
if (entry.getValue() == PyNamedParameterImpl.this) {
|
||||
final PyExpression argument = entry.getKey();
|
||||
if (argument != null) {
|
||||
final PyType type = context.getType(argument);
|
||||
if (type != null) {
|
||||
types.add(type);
|
||||
return true;
|
||||
final PyArgumentList argumentList = call.getArgumentList();
|
||||
if (argumentList != null) {
|
||||
final CallArgumentsMapping mapping = argumentList.analyzeCall(resolveContext);
|
||||
for (Map.Entry<PyExpression, PyNamedParameter> entry : mapping.getPlainMappedParams().entrySet()) {
|
||||
if (entry.getValue() == PyNamedParameterImpl.this) {
|
||||
final PyExpression argument = entry.getKey();
|
||||
if (argument != null) {
|
||||
final PyType type = context.getType(argument);
|
||||
if (type != null) {
|
||||
types.add(type);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user