OPEN - issue BATCH-304: BatchCommandLineLauncher simplified and rename

http://jira.springframework.org/browse/BATCH-304
This commit is contained in:
dsyer
2008-01-24 09:00:39 +00:00
parent 9185795686
commit ae37f59148
2 changed files with 8 additions and 6 deletions

View File

@@ -19,8 +19,6 @@ package org.springframework.batch.core.domain;
import java.util.ArrayList;
import java.util.List;
import org.springframework.util.Assert;
/**
* Batch domain object representing a job instance. A job instance is defined as
@@ -46,8 +44,7 @@ public class JobInstance extends Entity {
public JobInstance(Long id, JobParameters jobParameters) {
super(id);
Assert.notNull(jobParameters, "JobParameters must not be null.");
this.jobParameters = jobParameters;
this.jobParameters = jobParameters==null ? new JobParameters() : jobParameters;
}
public JobInstance(Long id, JobParameters jobParameters, Job job){
@@ -94,7 +91,7 @@ public class JobInstance extends Entity {
* @return the job name. (Equivalent to getJob().getName())
*/
public String getJobName() {
return getJob().getName();
return job==null ? null : job.getName();
}
public JobExecution createJobExecution() {