@Override public Request<BuilderStatus> cancel(ProjectReference projectReference,long taskId){
  List<DummyBuilderStatus> statuses=availableBuilderStatuses.get(projectReference.name());
  DummyBuilderStatus found=null;
  if (statuses != null && !statuses.isEmpty()) {
    for (    DummyBuilderStatus builderStatus : statuses) {
      if (taskId == builderStatus.taskId()) {
        found=builderStatus;
      }
    }
  }
  if (found != null) {
    found.setStatus(BuilderState.CANCELLED);
    List<DummyBuilderStatus> currents=currentBuilderStatuses.get(projectReference.name());
    if (currents != null) {
      currents.remove(found);
    }
  }
  return new DummyRequest<BuilderStatus>(found);
}

@ Override public Request < BuilderStatus > cancel ( ProjectReference projectReference , long taskId ) { List < DummyBuilderStatus > statuses = availableBuilderStatuses . get ( projectReference . name ( ) ) ; DummyBuilderStatus found = null ; if ( statuses != null && ! statuses . isEmpty ( ) ) { for ( DummyBuilderStatus builderStatus : statuses ) { if ( taskId == builderStatus . taskId ( ) ) { found = builderStatus ; } } } if ( found != null ) { found . setStatus ( BuilderState . CANCELLED ) ; List < DummyBuilderStatus > currents = currentBuilderStatuses . get ( projectReference . name ( ) ) ; if ( currents != null ) { currents . remove ( found ) ; } } return new DummyRequest < BuilderStatus > ( found ) ; }
cancels the builder with the given task id .
