Skip to content

Commit 87d0c4d

Browse files
ParadiseCHOIfmbenhassine
authored andcommitted
Remove unnecessary expressions in AsyncItemWriter
Issue #4009 (cherry picked from commit 48925f0)
1 parent b4cb1f3 commit 87d0c4d

File tree

1 file changed

+3
-3
lines changed
  • spring-batch-integration/src/main/java/org/springframework/batch/integration/async

1 file changed

+3
-3
lines changed

spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemWriter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2023 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.
@@ -67,13 +67,13 @@ public void write(Chunk<? extends Future<T>> items) throws Exception {
6767
T item = future.get();
6868

6969
if (item != null) {
70-
list.add(future.get());
70+
list.add(item);
7171
}
7272
}
7373
catch (ExecutionException e) {
7474
Throwable cause = e.getCause();
7575

76-
if (cause != null && cause instanceof Exception) {
76+
if (cause instanceof Exception) {
7777
logger.debug("An exception was thrown while processing an item", e);
7878

7979
throw (Exception) cause;

0 commit comments

Comments
 (0)