Enumeration enum = tasks.elements(); while (enum.hasMoreElements()) { publishAddTask((Task) enum.nextElement());
Enumeration en = tasks.elements(); while (en.hasMoreElements()) { publishAddTask((Task) en.nextElement());
  protected void publishExpansion(Task parent, Vector tasks) {    if (tasks.isEmpty()) {      if (logger.isErrorEnabled()) {        logger.error("publishExpansion - no tasks" + TaskUtils.taskDesc(parent));      }      return;    }    Enumeration elements = tasks.elements();    Task task = (Task) elements.nextElement();    PlanElement pe = parent.getPlanElement();    Expansion expansion;    if (pe == null) {      // In MB5.2 no longer automatically publishes tasks in a workflow.      Enumeration enum = tasks.elements();      while (enum.hasMoreElements()) {        publishAddTask((Task) enum.nextElement());      }      // create new expansion      expansion = buildExpansion(parent, tasks);      delegate_.publishAdd(expansion);      return;    }