ItEr60S04ValidacionEProbasFuncionaisItEr59S04: [Bug #553] No such vertex in graph in addInsertionOrderOnQueueEdges

This commit is contained in:
Diego Pino Garcia 2010-07-19 13:08:34 +02:00 committed by Javier Moran Rua
parent 179f430435
commit 1c849aed1a

View file

@ -426,6 +426,17 @@ public class QueuesState {
List<LimitingResourceQueueElement> elements) {
LimitingResourceQueueElement previous = first;
for (LimitingResourceQueueElement each : elements) {
// FIXME: Fixs bug #553, "No such vertex in graph". It seems that
// , for some reason, some of the vertexs (queue elements) are not in graph
// at this point
if (!result.containsVertex(previous)) {
result.addVertex(previous);
}
if (!result.containsVertex(each)) {
result.addVertex(each);
}
result.addEdge(previous, each, Edge.insertionOrder(previous, each));
previous = each;
}