diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/ListItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/ListItemReader.java index 2def56dc6..0fcd98b7f 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/ListItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/ListItemReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2021 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. @@ -16,7 +16,7 @@ package org.springframework.batch.item.support; -import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; import org.springframework.aop.support.AopUtils; @@ -27,7 +27,8 @@ import org.springframework.lang.Nullable; * An {@link ItemReader} that pulls data from a list. Useful for testing. * * @author Dave Syer - * + * @author jojoldu + * */ public class ListItemReader implements ItemReader { @@ -40,7 +41,7 @@ public class ListItemReader implements ItemReader { this.list = list; } else { - this.list = new ArrayList<>(list); + this.list = new LinkedList<>(list); } }