All pastes #975391 Raw Edit

Stuff

public java v1 · immutable
·published 2008-04-07 15:03 UTC
rendered paste body
public class NewTaskManager{/* ... */  protected void removeTask(Runnable r)  {    synchronized (assignedTasks)    {      assignedTasks.remove(r);      //TODO !! Remove doesn't work correct. objects with e.compareto(o) == 0 are deleted!!      taskQueue.remove(r);          }    if (r instanceof Task)    {      Task task = (Task) r;      if (!task.getChildren().isEmpty())        logger.info("Task \"" + task                    + "\" has finished before its child tasks: "                    + task.getChildren());      if (task.isVisible())        fireTaskDone(task);      if (logger.isDebugEnabled())        logger.debug("Removed task \"" + task + "\"");    }    else    {      logger.info("Runnable object \"" + r                  + "\" does not implement interface Task. ");      throw new Error("Runnable object \"" + r                      + "\" does not implement interface Task. ");    }    startNextTasks();  }/* ... */}