Collection<Plug> invalid_source_plugs = new Vector<Plug>();
for (Map.Entry<Plug,Collection<Plug>> e : connectors.entrySet())
{
Plug source = e.getKey();
if (!source.isValidSource(this))
{
if (log != null)
log.warn(String.format("Removing connector from unresolved output port: %s/%s", source.getModule().getDescription(), source.getPort()));
invalid_source_plugs.add(source);
}
else
{
for (Iterator<Plug> it = e.getValue().iterator() ; it.hasNext() ; )
{
Plug target = it.next();
if (!target.isValidTarget(this))
{
if (log != null)
log.warn(String.format("Removing connector from unresolved input port: %s/%s", target.getModule().getDescription(), target.getPort()));
it.remove();
is_changed = true;
}
}
}