From 4292897432f545323ab1fc6759e825ebb66b4657 Mon Sep 17 00:00:00 2001
From: lucasward
Date: Thu, 20 Sep 2007 18:34:48 +0000
Subject: [PATCH] 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()
---
.../batch/core/domain/StepInstance.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/core/src/main/java/org/springframework/batch/core/domain/StepInstance.java b/core/src/main/java/org/springframework/batch/core/domain/StepInstance.java
index 1a7cec95e..611beb96e 100644
--- a/core/src/main/java/org/springframework/batch/core/domain/StepInstance.java
+++ b/core/src/main/java/org/springframework/batch/core/domain/StepInstance.java
@@ -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.
*
- *
+ *
*
* 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.
*
- *
+ *
* @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;