throw new CannotTranslateException("vm may not be null");
}
final Schedule_Type t_sched = new Schedule_Type();
final Schedule sched = vm.getSchedule();
if (sched == null) {
return t_sched; // *** EARLY RETURN ***
}
final int seconds = sched.getDurationSeconds();
if (seconds > -1) {
t_sched.setDuration(CommonUtil.secondsToDuration(seconds));
}
final Calendar startTime = sched.getStartTime();
if (startTime != null) {
t_sched.setActualInstantiationTime(startTime);
}
final Calendar termTime = sched.getDestructionTime();
if (termTime != null) {
t_sched.setActualTerminationTime(termTime);
}
return t_sched;