Enumeration enum = w.getTasks(); while (enum.hasMoreElements()) { Task subT = (Task)enum.nextElement();
Enumeration en = w.getTasks(); while (en.hasMoreElements()) { Task subT = (Task)en.nextElement();
  private void removeTaskFromWorkflow(Task t) {    if (t == null)      return;    WorkflowImpl w = (WorkflowImpl)t.getWorkflow();    if (w == null)      return;    boolean hasSub = false;    synchronized (w) {      Enumeration enum = w.getTasks();      while (enum.hasMoreElements()) {	Task subT = (Task)enum.nextElement();	if (subT == t) {	  hasSub = true;	  break;	}      }    }