boolean (@NotNull PsiModifierListOwner owner, @Nullable String annotationFQN) { if (annotationFQN == null) return true; if (owner instanceof PsiMethod && PsiUtil.canBeOverridden((PsiMethod)owner)) { if (!(owner instanceof PsiMethodImpl) || !JavaSourceInference.canInferFromSource((PsiMethodImpl)owner)) { return true; } } if (ORG_JETBRAINS_ANNOTATIONS_CONTRACT.equals(annotationFQN) && HardcodedContracts.hasHardcodedContracts(owner)) { return true; } if (annotationFQN.equals(myNullabilityManager.getDefaultNotNull()) && owner instanceof PsiParameter && owner.getParent() != null) { List<String> annotations = NullableNotNullManager.getInstance(owner.getProject()).getNullables(); if (isAnnotated(owner, annotations, CHECK_EXTERNAL | CHECK_TYPE)) { return true; } if (HardcodedContracts.hasHardcodedContracts(owner)) { return true; } } return false; }