mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Statement list cannot be null
This commit is contained in:
@@ -968,20 +968,18 @@ public class PyClassImpl extends PyPresentableElementImpl<PyClassStub> implement
|
||||
else {
|
||||
final PyStatementList statementList = function.getStatementList();
|
||||
final List<PyTargetExpression> result = new ArrayList<PyTargetExpression>();
|
||||
if (statementList != null) {
|
||||
statementList.accept(new PyRecursiveElementVisitor() {
|
||||
@Override
|
||||
public void visitPyClass(PyClass node) {}
|
||||
statementList.accept(new PyRecursiveElementVisitor() {
|
||||
@Override
|
||||
public void visitPyClass(PyClass node) {}
|
||||
|
||||
public void visitPyAssignmentStatement(final PyAssignmentStatement node) {
|
||||
for (PyExpression expression : node.getTargets()) {
|
||||
if (expression instanceof PyTargetExpression) {
|
||||
result.add((PyTargetExpression)expression);
|
||||
}
|
||||
public void visitPyAssignmentStatement(final PyAssignmentStatement node) {
|
||||
for (PyExpression expression : node.getTargets()) {
|
||||
if (expression instanceof PyTargetExpression) {
|
||||
result.add((PyTargetExpression)expression);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user