ItEr57S04ValidacionEProbasFuncionaisItEr56S04: Fix bug.

When a limiting tasks has no outgoing dependencies an empty graph was
produced and this caused an assertion at TopologicalOrderIterator to
fail.
This commit is contained in:
Óscar González Fernández 2010-06-12 18:30:32 +02:00
parent 9ba4a0c8bc
commit 06dc96efcc

View file

@ -316,6 +316,7 @@ public class QueuesState {
LimitingResourceQueueElement element) {
Set<LimitingResourceQueueDependency> outgoingEdgesOf = graph
.outgoingEdgesOf(element);
result.addVertex(element);
for (LimitingResourceQueueDependency each : outgoingEdgesOf) {
addDependency(result, each);
buildOutgoingGraphFor(result, each.getHasAsDestiny());