public void cleanBuildTask(long id) throws NotFoundException {
  FutureBuildTask task=tasks.remove(id);
  if (task == null) {
    throw new NotFoundException(String.format("Invalid build task id: %d",id));
  }
  task.cancel(true);
  cleanup(task);
}

public void cleanBuildTask ( long id ) throws NotFoundException { FutureBuildTask task = tasks . remove ( id ) ; if ( task == null ) { throw new NotFoundException ( String . format ( "Invalid build task id: %d" , id ) ) ; } task . cancel ( true ) ; cleanup ( task ) ; }
clean - up all resources and files allocated for the given build task .
