@Override
  public @NotNull Set<WatchRequest> replaceWatchedRoots(
    @NotNull Collection<WatchRequest> watchRequestsToRemove,
    @Nullable Collection<String> recursiveRootsToAdd,
    @Nullable Collection<String> flatRootsToAdd
  ) {
    if (myDisposed) return Set.of();

    var nonNullWatchRequestsToRemove = ContainerUtil.skipNulls(watchRequestsToRemove);
    LOG.assertTrue(nonNullWatchRequestsToRemove.size() == watchRequestsToRemove.size(), "watch requests collection should not contain `null` elements");

    if ((recursiveRootsToAdd != null || flatRootsToAdd != null) && WATCH_ROOTS_LOG.isTraceEnabled()) {
      WATCH_ROOTS_LOG.trace(new Exception("LocalFileSystemImpl#replaceWatchedRoots:" +
                                          "\n  recursive: " + (recursiveRootsToAdd != null ? recursiveRootsToAdd : "[]") +
                                          "\n  flat: " + (flatRootsToAdd != null ? flatRootsToAdd : "[]")));
    }

    return myWatchRootsManager.replaceWatchedRoots(
      nonNullWatchRequestsToRemove,
      requireNonNullElse(recursiveRootsToAdd, List.of()),
      requireNonNullElse(flatRootsToAdd, List.of()));
  }
@Override
  public @NotNull Set<WatchRequest> replaceWatchedRoots(
    @NotNull Collection<WatchRequest> watchRequestsToRemove,
    @Nullable Collection<String> recursiveRootsToAdd,
    @Nullable Collection<String> flatRootsToAdd
  )