From 4b8331d7247b20de6377b5fb6ffcb68323f11925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=83=E1=85=A9=E1=86=BC=E1=84=8B?= =?UTF-8?q?=E1=85=AE=E1=86=A8?= Date: Sat, 19 Sep 2020 23:01:17 +0900 Subject: [PATCH] Replace ArrayList with LinkedList in ListItemReader Issue #3782 --- .../batch/item/support/ListItemReader.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); } }