Skip to content

Commit 1e821e6

Browse files
committed
Add author and refactor
1 parent 89661ae commit 1e821e6

File tree

1 file changed

+5
-4
lines changed
  • spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet

1 file changed

+5
-4
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
* @author Michael Minella
7373
* @author Will Schipp
7474
* @author Mahmoud Ben Hassine
75+
* @author Seonkyo Ok
7576
*/
7677
public class TaskletStep extends AbstractStep {
7778

@@ -239,7 +240,7 @@ protected void doExecute(StepExecution stepExecution) throws Exception {
239240
public RepeatStatus doInChunkContext(RepeatContext repeatContext, ChunkContext chunkContext)
240241
throws Exception {
241242

242-
StepExecution stepExecution = chunkContext.getStepContext().getStepExecution();
243+
final StepExecution stepExecution = chunkContext.getStepContext().getStepExecution();
243244

244245
// Before starting a new transaction, check for
245246
// interruption.
@@ -374,7 +375,7 @@ public RepeatStatus doInTransaction(TransactionStatus status) {
374375

375376
RepeatStatus result = RepeatStatus.CONTINUABLE;
376377

377-
StepContribution contribution = stepExecution.createStepContribution();
378+
final StepContribution contribution = stepExecution.createStepContribution();
378379

379380
chunkListener.beforeChunk(chunkContext);
380381

@@ -444,7 +445,7 @@ public RepeatStatus doInTransaction(TransactionStatus status) {
444445
catch (Exception e) {
445446
// If we get to here there was a problem saving the step
446447
// execution and we have to fail.
447-
String msg = "JobRepository failure forcing rollback";
448+
final String msg = "JobRepository failure forcing rollback";
448449
logger.error(msg, e);
449450
throw new FatalStepExecutionException(msg, e);
450451
}
@@ -483,7 +484,7 @@ private void rollback(StepExecution stepExecution) {
483484
}
484485
}
485486

486-
private void copy(final StepExecution source, final StepExecution target) {
487+
private static void copy(final StepExecution source, final StepExecution target) {
487488
target.setVersion(source.getVersion());
488489
target.setWriteCount(source.getWriteCount());
489490
target.setFilterCount(source.getFilterCount());

0 commit comments

Comments
 (0)