@Override
    public void visitMethod(@NotNull PsiMethod method) {
      super.visitMethod(method);
      if (method.isConstructor() || method.getReturnType() instanceof PsiPrimitiveType) {
        return;
      }

      final Collection<PsiMethod> overridingMethods = OverridingMethodsSearch.search(method).findAll();
      for (final PsiMethod overridingMethod : overridingMethods) {
        if (isNullable(overridingMethod)) {
          registerNullableAnnotation(method);
          return;
        }
      }

      final NullableNotNullManager manager = NullableNotNullManager.getInstance(method.getProject());
      if (!manager.isNotNull(method, false) && manager.isNotNull(method, true)) {
        registerNotNullAnnotation(method);
        return;
      }

      if (hasNullability(method)) {
        return;
      }

      Nullability nullability = DfaUtil.inferMethodNullability(method);
      switch (nullability) {
        case NULLABLE -> registerNullableAnnotation(method);

        case NOT_NULL -> {
          for (final PsiMethod overridingMethod : overridingMethods) {
            if (!isNotNull(overridingMethod)) {
              return;
            }
          }
          registerNotNullAnnotation(method);
        }
      }
    }
@Override
    public void visitMethod(@NotNull PsiMethod method)