...but only if a step execution dao is provided

This commit is contained in:
dsyer
2008-08-13 12:38:52 +00:00
parent 8970bf60f7
commit 9972d41d6d

View File

@@ -145,8 +145,11 @@ public abstract class AbstractJobExecutionDaoTests extends AbstractTransactional
exec.createStepExecution(new StepSupport("foo"));
dao.saveJobExecution(exec);
for (StepExecution stepExecution : exec.getStepExecutions()) {
getStepExecutionDao().saveStepExecution(stepExecution);
StepExecutionDao stepExecutionDao = getStepExecutionDao();
if (stepExecutionDao != null) {
for (StepExecution stepExecution : exec.getStepExecutions()) {
stepExecutionDao.saveStepExecution(stepExecution);
}
}
JobExecution value = dao.getJobExecution(exec.getId());