OPEN - issue BATCH-136: restoreFromRestartData(Tasklet, RestartData) crashes if Properties are null

http://opensource.atlassian.com/projects/spring/browse/BATCH-136

Fixed StepInstance to no longer pass null to GenericRestartData()
This commit is contained in:
lucasward
2007-09-20 18:34:48 +00:00
parent 0891667d44
commit 4292897432

View File

@@ -16,6 +16,8 @@
package org.springframework.batch.core.domain;
import java.util.Properties;
import org.springframework.batch.restart.GenericRestartData;
import org.springframework.batch.restart.RestartData;
@@ -30,7 +32,7 @@ import org.springframework.batch.restart.RestartData;
* it's ID, which is obtained from a JobRepository. Two steps with the same name
* and same job can be considered the same step.
* </p>
*
*
* <p>
* Because each step represents a runnable batch artifact with it's own
* lifecycle, each step contains status and an execution count. Status
@@ -39,10 +41,10 @@ import org.springframework.batch.restart.RestartData;
* this individual step. It should be noted that a restartable job will create a
* new step instance (the same logical step, with a different ID) for every run.
* </p>
*
*
* @author Lucas Ward
* @author Dave Syer
*
*
*/
public class StepInstance extends Entity {
@@ -51,7 +53,7 @@ public class StepInstance extends Entity {
// TODO declare transient or make serializable
private BatchStatus status;
private RestartData restartData = new GenericRestartData(null);
private RestartData restartData = new GenericRestartData(new Properties());
private int stepExecutionCount = 0;