return (Organization)support_orgs.nextElement(); }
if (support_orgs.hasMoreElements()) { return (Organization)support_orgs.nextElement(); } else { return null; } }
  private Organization findBestSource(Task task) {    Enumeration support_orgs;        if (getTaskUtils().isProjection(task)) {            /* For a projection, should be time-phased as support      changes over time. We try for one provider for the whole task, if that doesn't work      we try to split it.*/      support_orgs = getAssetUtils().getSupportingOrgs(inventoryPlugin.getMyOrganization(),                                                providerRole,                                                       getTaskUtils().getStartTime(task),                                                       TaskUtils.getEndTime(task));      // if we have no providers that cover the whole projection, split it and try again      if (!support_orgs.hasMoreElements()) {        HashMap provSchedMap = inventoryPlugin.relationshipScheduleMap();        List howToSplit = inventoryPlugin.getNewTaskSplitTimes(task, provSchedMap);        // if we can split it, do it, if not warn that we have no provider        if (!howToSplit.isEmpty()) {          Collection newPartialTasks = getTaskUtils().splitProjection(task, howToSplit, inventoryPlugin);          allocateRefillTasks(newPartialTasks);        } else {          logger.warn("No "+providerRole+" for task " + task.getUID() + ", during ["+                    getTimeUtils().dateString(getTaskUtils().getStartTime(task))+                    "-" +                    getTimeUtils().dateString(TaskUtils.getEndTime(task)) +"]"+". Will retry.");              return null;            }		}		    } else {      support_orgs = getAssetUtils().getSupportingOrgs(inventoryPlugin.getMyOrganization(),                                                       providerRole,                                                       getTaskUtils().getEndTime(task));      if (!support_orgs.hasMoreElements()) {        logger.warn("No "+providerRole+" for task " + task.getUID() + ", during "+                    getTimeUtils().dateString(getTaskUtils().getEndTime(task))+". Will retry.");        return null;			}		    }    // For now, returning the first supporting org during the time span    return (Organization)support_orgs.nextElement();			}