void (Collection<? extends InspectionConfigTreeNode> nodes) { Deque<InspectionConfigTreeNode> q = new ArrayDeque<>(nodes.size()); Set<InspectionConfigTreeNode> alreadyUpdated = new HashSet<>(); for (InspectionConfigTreeNode node : nodes) { q.addLast(node); } while (true) { InspectionConfigTreeNode inspectionConfigTreeNode = q.pollFirst(); if (inspectionConfigTreeNode == null) { break; } if (!alreadyUpdated.add(inspectionConfigTreeNode)) { continue; } inspectionConfigTreeNode.dropCache(); TreeNode parent = inspectionConfigTreeNode.getParent(); if (parent != null && parent.getParent() != null) { q.addLast((InspectionConfigTreeNode)parent); } } }