Skip to content

Commit dacf5bc

Browse files
committed
Remove unused variable in FaultTolerantChunkProcessor
This commit removes the count variable which is incremented but never queried.
1 parent 7067dcb commit dacf5bc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantChunkProcessor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2020 the original author or authors.
2+
* Copyright 2006-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020
import java.util.Collections;
2121
import java.util.Iterator;
2222
import java.util.List;
23-
import java.util.concurrent.atomic.AtomicInteger;
2423
import java.util.concurrent.atomic.AtomicReference;
2524

2625
import io.micrometer.core.instrument.Tag;
@@ -213,7 +212,6 @@ protected Chunk<O> transform(final StepContribution contribution, Chunk<I> input
213212
final UserData<O> data = (UserData<O>) inputs.getUserData();
214213
final Chunk<O> cache = data.getOutputs();
215214
final Iterator<O> cacheIterator = cache.isEmpty() ? null : new ArrayList<>(cache.getItems()).iterator();
216-
final AtomicInteger count = new AtomicInteger(0);
217215

218216
// final int scanLimit = processorTransactional && data.scanning() ? 1 :
219217
// 0;
@@ -230,7 +228,6 @@ public O doWithRetry(RetryContext context) throws Exception {
230228
String status = BatchMetrics.STATUS_SUCCESS;
231229
O output = null;
232230
try {
233-
count.incrementAndGet();
234231
O cached = (cacheIterator != null && cacheIterator.hasNext()) ? cacheIterator.next() : null;
235232
if (cached != null && !processorTransactional) {
236233
output = cached;

0 commit comments

Comments
 (0)