bug fix for empty graphs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2760 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
11f7a55b2e
commit
fc495cf49e
|
@ -100,9 +100,11 @@ public class BFSIterator<T> implements Iterator<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
index = 0;
|
index = 0;
|
||||||
|
if (Q.size() > 0) {
|
||||||
T current = Q.get(0);
|
T current = Q.get(0);
|
||||||
visitChildren(current);
|
visitChildren(current);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void visitChildren(T N) {
|
private void visitChildren(T N) {
|
||||||
for (Iterator<? extends T> children = getConnected(N); children.hasNext();) {
|
for (Iterator<? extends T> children = getConnected(N); children.hasNext();) {
|
||||||
|
|
Loading…
Reference in New Issue