void (@NotNull Node child) { child.forEachChildExceptLoading(this::removeEmpty); if (child.paths.isEmpty()) { child.queue.close(); Node node = map.remove(child.object); if (node != child) { LOG.warn("invalid node: " + child.object); if (node != null) map.put(node.object, node); } } }