BATCH-2150: Added private constructor to StepExecution for use by Jackson deserialization

This commit is contained in:
Michael Minella
2013-11-27 10:32:28 -06:00
parent 0d45839a88
commit f75d7fa922

View File

@@ -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
*