Use the Chunk API consistently
This commit replaces the usage of List with Chunk where appropriate. Summary of changes: - The Chunk class was moved from the `org.springframework.batch.core.step.item` package to the `org.springframework.batch.item` package - The signature of the method `ItemWriter#write(List)` was changed to `ItemWriter#write(Chunk)` - All implementations of `ItemWriter` were updated to use the Chunk API instead of List - All methods in the `ItemWriteListener` interface were updated to use the Chunk API instead of List - All implementations of `ItemWriteListener` were updated to use the Chunk API instead of List - The constructor of `ChunkRequest` was changed to accept a Chunk instead of a Collection of items - The return type of `ChunkRequest#getItems()` was changed from List to Chunk Resolves #3954
This commit is contained in:
@@ -34,6 +34,7 @@ import org.springframework.batch.core.configuration.annotation.EnableBatchProces
|
||||
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
|
||||
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
|
||||
import org.springframework.batch.core.configuration.annotation.StepScope;
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemProcessor;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
@@ -144,7 +145,7 @@ class StepScopeAnnotatedListenerIntegrationTests {
|
||||
return new ItemWriter<String>() {
|
||||
|
||||
@Override
|
||||
public void write(List<? extends String> items) throws Exception {
|
||||
public void write(Chunk<? extends String> items) throws Exception {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user