consistent ARRAY_FACTORY

This commit is contained in:
Alexey Kudravtsev
2017-04-13 15:30:00 +03:00
parent e48005b3cc
commit 8deb16a12f
21 changed files with 35 additions and 35 deletions
@@ -39,7 +39,8 @@ import java.util.Map;
*/
public interface PyClass extends PsiNameIdentifierOwner, PyStatement, PyDocStringOwner, StubBasedPsiElement<PyClassStub>,
ScopeOwner, PyDecoratable, PyTypedElement, PyQualifiedNameOwner, PyStatementListContainer, PyWithAncestors {
ArrayFactory<PyClass> ARRAY_FACTORY = count -> new PyClass[count];
PyClass[] EMPTY_ARRAY = new PyClass[0];
ArrayFactory<PyClass> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new PyClass[count];
@Nullable
ASTNode getNameNode();
@@ -39,7 +39,7 @@ public interface PyFunction extends PsiNamedElement, StubBasedPsiElement<PyFunct
PyPossibleClassMember, PyTypeCommentOwner, PyAnnotationOwner {
PyFunction[] EMPTY_ARRAY = new PyFunction[0];
ArrayFactory<PyFunction> ARRAY_FACTORY = count -> new PyFunction[count];
ArrayFactory<PyFunction> ARRAY_FACTORY = count -> count == 0 ? EMPTY_ARRAY : new PyFunction[count];
/**
* Returns the AST node for the function name identifier.