Set<WatchRequest> (@NotNull Collection<WatchRequest> watchRequestsToRemove, @Nullable Collection<String> recursiveRootsToAdd, @Nullable Collection<String> flatRootsToAdd) { if (myDisposed) return Collections.emptySet(); 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, Collections.emptyList()), requireNonNullElse(flatRootsToAdd, Collections.emptyList())); }