BATCH-1053: Modified so that AbstractJob.getStep() returns null if the step is not found and Flow.getState() returns null if the state is not found. Javadocs and unit tests were updated to reflect this change.

This commit is contained in:
dhgarrette
2009-02-03 18:08:32 +00:00
parent b09e1ece01
commit 7487b4dfd2
9 changed files with 89 additions and 15 deletions

View File

@@ -142,9 +142,15 @@ public abstract class AbstractJobTests {
* if there is no Step with the given name.
*
* @param stepName
* @return JobExecution
*/
public JobExecution launchStep(String stepName) {
return getStepRunner().launchStep(this.job.getStep(stepName));
Step step = this.job.getStep(stepName);
if(step == null)
{
throw new IllegalStateException("No Step found with name: [" + stepName + "]");
}
return getStepRunner().launchStep(step);
}
/**