if (iter2.hasNext()) {
if (iter2.hasNext())
    public synchronized void execute() {	if (community == null) return;        // handle new agents	if (newAgentQueue.size() > 0) {	    Vector q;	    synchronized (newAgentQueue) {		q = newAgentQueue;		newAgentQueue = new Vector();	    }	    if (log.isDebugEnabled()) 		log.debug("execute: newAgentQueue="+q);	    int tsLookupCnt = 0;	    Iterator iter = q.iterator();	    while (iter.hasNext()) {//              AgentEntry ae = (AgentEntry)iter.next();		String agentName = (String)iter.next();		Action action;//		String agentName = ae.agentName;		try {		    action = new LinksEnablingAction(agentName,myValuesOffered,sb);		} catch  (TechSpecNotFoundException e) {//		    if (tsLookupCnt > 10) {			if (log.isWarnEnabled())			    log.warn("TechSpec not found for LinksEnablingAction.  Will retry.", e);//			tsLookupCnt = 0;//		    }		    bb.signalClientActivity();		    break;		} catch (IllegalValueException e) {		    if (log.isErrorEnabled())			log.error("Attempt to create Action with illegal initial valuesOffered="				  +myValuesOffered+". No LinksEnablingAction created for agent="+agentName);		    iter.remove();		    break;		}//		ae.action = action;		if (log.isDebugEnabled()) 		    log.debug("execute: publishAdd "+action);		bb.publishAdd(action);		iter.remove();	    }	}	        Iterator iter = actionSub.getChangedCollection().iterator();	while (iter.hasNext()) {	    LinksEnablingAction action = (LinksEnablingAction)iter.next();	    if (action != null) {		Set pvs = action.getPermittedValues();		if (pvs != null) {		    action.clearNewPermittedValues();		    String pv = NONE;		    Iterator iter2 = pvs.iterator();		    if (iter2.hasNext()) {  // there's 0 or 1 permitted values			pv = (String)iter2.next();		    }		    String agent = action.getAssetName();		    String key = "Agent"+KEY_SEPR+agent+KEY_SEPR+"MsglogLinksEnable";		    MetricImpl metric = 			new MetricImpl(pv,				       SECOND_MEAS_CREDIBILITY,				       "",				       "LinksEnablingActuator");		    if (log.isDebugEnabled()) 			log.debug("execute: Updating MetricsService:key="+key+",value="+metric);		    updateSvc.updateValue(key, metric);		    boolean startOK = true;		    if (!pv.equals(NONE)) {			try {			    action.start(pv);			} catch (IllegalValueException e) {			    if (log.isErrorEnabled())				log.error("start called with illegal action value="+pv+"=. "					  +"action="+action+" was not started.");			    startOK = false;			}		    }		    if (startOK) {			Action.CompletionCode cc = pv.equals(NONE) ? Action.COMPLETED : Action.ACTIVE;			try {			    action.stop(cc);			    bb.publishChange(action);			} catch (IllegalValueException e) {			    if (log.isErrorEnabled())				log.error("stop called with illegal completion code="+cc+"=. "					  +"action="+action+" was not stopped.");			} catch (NoStartedActionException e) {			    if (log.isErrorEnabled())				log.error("stop called before action started. "					  +"action="+action+" was not stopped.");			}					    }		}	    }	}    }