void (@NotNull Object oldObject, @NotNull Object newObject) { if (ContainerUtil.exists(paths, path -> contains(path, oldObject))) { // replace instance of user's object in all internal maps to avoid memory leaks List<TreePath> updated = ContainerUtil.map(paths, path -> update(path, oldObject, newObject)); paths.clear(); paths.addAll(updated); forEachChildExceptLoading(child -> child.updatePaths(oldObject, newObject)); } }