boolean (PsiParameter listOwner, ParameterAnnotations parameterAnnotations) { if (!parameterAnnotations.notNull) return false; PsiMethod method = ObjectUtils.tryCast(listOwner.getDeclarationScope(), PsiMethod.class); if (method == null) return false; int index = method.getParameterList().getParameterIndex(listOwner); PsiAnnotation anno = findInferredAnnotation(method, JavaMethodContractUtil.ORG_JETBRAINS_ANNOTATIONS_CONTRACT); if (anno == null) return false; for (StandardMethodContract contract : JavaMethodContractUtil.parseContracts(method, anno)) { if (contract.getReturnValue().isFail()) { ValueConstraint constraint = contract.getParameterConstraint(index); if (constraint == ValueConstraint.NULL_VALUE) { return true; } } } return false; }