void (TreeExpansionEvent event) { TreePath path = event.getPath(); Object component = path.getLastPathComponent(); if (component instanceof Node node) { if (!myExpandingCollapsing && node.needsUpdate()) { List<Node> toUpdate = new ArrayList<>(); checkNodeValidity(node, path, toUpdate); queueUpdateBulk(toUpdate, EmptyRunnable.getInstance()); } } }