From f75d7fa92294a356f94176f21f26e2f3a7e13fa8 Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Wed, 27 Nov 2013 10:32:28 -0600 Subject: [PATCH] BATCH-2150: Added private constructor to StepExecution for use by Jackson deserialization --- .../springframework/batch/core/StepExecution.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 *