diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java index 96fa8a4fc..7b410efd0 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java @@ -102,6 +102,21 @@ public class StepExecution extends Entity { this.jobExecution = jobExecution; } + /** + * Constructor that requires only a stepName. Intended only to be + * used via serialization libraries to address the circular + * reference between {@link JobExecution} and StepExecution. + * + * @param stepName the name of the executed step + */ + @SuppressWarnings("unused") + private StepExecution(String stepName) { + super(); + Assert.hasLength(stepName); + this.stepName = stepName; + this.jobExecution = null; + } + /** * Returns the {@link ExecutionContext} for this execution *