// We do not need the validity checking because this method is
// only called from the _constructDependencyGraph() method, which
// again can only be accessed from the _validate() method.
// The _validate() method does the validity checking already
// and gets the read access of workspace.
DirectedGraph dependencyGraph = _dependencyGraph;
// Note we can not use iterator here because the edges() method
// returns an unmodifiableList. The removeEdge() method will cause
// a concurrentModification exception.
Object[] edges = dependencyGraph.edges().toArray();
for (int i = 0; i < edges.length; i++) {
Edge edge = (Edge) edges[i];
if (edge.source().getWeight().equals(inputPort)
&& edge.sink().getWeight().equals(outputPort)) {
dependencyGraph.removeEdge(edge);
}
}
}