mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tracing BFS: add cycles protection
This commit is contained in:
@@ -340,6 +340,7 @@ public abstract class TreeTraverser<T> {
|
||||
public T next() {
|
||||
T result = queue.remove();
|
||||
for (T t : children(result)) {
|
||||
if (paths.containsKey(t)) continue;
|
||||
queue.add(t);
|
||||
paths.put(t, result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user