if(conditionSubscription != null && conditionSubscription.getCollection() != null) { Iterator it = conditionSubscription.getCollection().iterator();
List l; synchronized(conditionEnabled) { l = new ArrayList(conditionEnabled); }       if(l != null) { Iterator it = l.iterator();
  public boolean isDefenseApplicable(String agentName) {    /*String condition = defenseName + ":" + agentName;    RestartDefenseCondition rdc = (RestartDefenseCondition)conditionService.getConditionByName(condition);    if(rdc != null) {      if(rdc.getValue().toString().equalsIgnoreCase("true"))        return true;    }*/    if(conditionSubscription != null && conditionSubscription.getCollection() != null) {      Iterator it = conditionSubscription.getCollection().iterator();      while (it.hasNext()) {        RestartDefenseCondition rdc = (RestartDefenseCondition) it.next();        if (rdc != null && rdc.getAssetType().equals(assetType) &&            rdc.getAsset().equals(agentName)) {          if (rdc.getValue().toString().equalsIgnoreCase("true"))            return true;        }      }    }    return false;  }