List iteration add can be replaced with addAll
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
7303de3933
commit
15dd8e280c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,9 +29,7 @@ public class ListItemWriter<T> implements ItemWriter<T> {
|
||||
|
||||
@Override
|
||||
public void write(List<? extends T> items) throws Exception {
|
||||
for (T item : items) {
|
||||
writtenItems.add(item);
|
||||
}
|
||||
writtenItems.addAll(items);
|
||||
}
|
||||
|
||||
public List<? extends T> getWrittenItems() {
|
||||
|
||||
Reference in New Issue
Block a user