diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/partition/JsrStepExecutionSplitter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/partition/JsrStepExecutionSplitter.java index 31f2980a6e..5e6b979894 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/partition/JsrStepExecutionSplitter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/partition/JsrStepExecutionSplitter.java @@ -84,7 +84,7 @@ public int compare(StepExecution arg0, StepExecution arg1) { JobExecution curJobExecution = new JobExecution(jobExecution); StepExecution curStepExecution = new StepExecution(stepName, curJobExecution); - if(!restoreState || getStartable(curStepExecution, new ExecutionContext())) { + if(!restoreState || isStartable(curStepExecution, new ExecutionContext())) { executions.add(curStepExecution); } } diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java index 4414d89c3c..d5962da37e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java @@ -184,7 +184,7 @@ public Set split(StepExecution stepExecution, int gridSize) throw StepExecution currentStepExecution = jobExecution.createStepExecution(stepName); - boolean startable = getStartable(currentStepExecution, context.getValue()); + boolean startable = isStartable(currentStepExecution, context.getValue()); if (startable) { set.add(currentStepExecution); @@ -238,6 +238,11 @@ private Map getContexts(StepExecution stepExecution, i return result; } + protected boolean isStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException { + return getStartable(stepExecution, context); + } + + @Deprecated protected boolean getStartable(StepExecution stepExecution, ExecutionContext context) throws JobExecutionException { JobInstance jobInstance = stepExecution.getJobExecution().getJobInstance();