logger.debug("Projected Requested Due-In schedule"); printSchedule(schedule, logger);
if (schedule != null) { logger.debug("Projected Requested Due-In schedule"); printSchedule(schedule, logger); } else { logger.debug("Projected Requested Due-In schedule is null!!!!"); }
  public Schedule getProjectedRequestedDueInSchedule() {    if (logInvPG == null) {      return null;    }          calcSwitchOverDay();    ScheduleImpl schedule = new ScheduleImpl();    schedule.setScheduleElementType(QuantityScheduleElementImpl.class);    Collection list = logInvPG.getProjSupplyList();    Iterator i = list.iterator();    while (i.hasNext()) {      Task task = (Task) i.next();      if (task == null)        continue;      long endTime = TaskUtils.getEndTime(task);       long startTime = getStartTime(task, endTime, false);      double quantity = TaskUtils.getDailyQuantity(task);      if (switchOverDay < endTime) {        // If switch over time occurs in the middle of a projection, we need to grab the part after that        if (switchOverDay > startTime)          startTime = switchOverDay;        while (startTime < endTime) {          NewQuantityScheduleElement qse = new QuantityScheduleElementImpl(startTime,                                                                           startTime + TimeUtils.MSEC_PER_DAY,                                                                           quantity);          schedule.addScheduleElement(qse);          startTime += TimeUtils.MSEC_PER_DAY;        }      }    }    if (logger.isDebugEnabled()) {      logger.debug("Projected Requested Due-In schedule");      printSchedule(schedule, logger);    }           return scheduleToNonOverlapSchedule(schedule);  }