private void makeAssignment2 (Task task, Resource resource, Resource.Block block, boolean doUpdates, boolean frozen) {
private Resource.Block makeAssignment2 (Task task, Resource resource, Resource.Block block, boolean doUpdates, boolean frozen) { Resource.Block ret = null; if (block != null) { ret = new Resource.Block(); ret.preAssignment = block.preAssignment; ret.postAssignment = block.postAssignment; if (ret.preAssignment != null) { ret.preWrapup = ret.preAssignment.getEndTime(); block.preAssignment.setEndTime (block.preWrapup); } if (ret.postAssignment != null) { ret.postSetup = ret.postAssignment.getStartTime(); block.postAssignment.setStartTime (block.postSetup); } }
  private void makeAssignment2 (Task task, Resource resource,                                Resource.Block block, boolean doUpdates,                                boolean frozen) {    Assignment a = (ignoringTime ?                    new Assignment (task, resource, 0, 0, 0, 0,                                    frozen, timeOps) :                    new Assignment (task, resource, block.setup, block.start,                                    block.end, block.wrapup, frozen, timeOps));    task.setAssignment (a);    resource.addAssignment (a, ! (ignoringTime || multitask || grouped),                            grouped && (block.groupedAssignment == null));    if (doUpdates) {      if (multitask)        resource.addMultitaskContribs (a);      else if (grouped)        resource.addGroupedContrib (a, block.groupedAssignment);      else        resource.addCapacityContribs (task.getCapacityContribs());      if (block != null) {        if (block.preAssignment != null)          block.preAssignment.setEndTime (block.preWrapup);        if (block.postAssignment != null)          block.postAssignment.setStartTime (block.postSetup);      }    }  }