Nullability[] (PsiSubstitutor substitutor, PsiParameter[] parameters) { if (myArgCount == 0) { return EMPTY_NULLABILITY_ARRAY; } int checkedCount = Math.min(myArgCount, parameters.length); Nullability[] nullabilities = new Nullability[myArgCount]; for (int i = 0; i < checkedCount; i++) { nullabilities[i] = DfaPsiUtil.getElementNullability(substitutor.substitute(parameters[i].getType()), parameters[i]); } return nullabilities; }