Skip to content

Commit

Permalink
Replace ArrayList with LinkedList in ListItemReader
Browse files Browse the repository at this point in the history
Issue #3782
  • Loading branch information
jojoldu authored and fmbenhassine committed May 18, 2021
1 parent b486e24 commit 4b8331d
Showing 1 changed file with 5 additions and 4 deletions.
@@ -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.
Expand All @@ -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;
Expand All @@ -27,7 +27,8 @@
* An {@link ItemReader} that pulls data from a list. Useful for testing.
*
* @author Dave Syer
*
* @author jojoldu
*
*/
public class ListItemReader<T> implements ItemReader<T> {

Expand All @@ -40,7 +41,7 @@ public ListItemReader(List<T> list) {
this.list = list;
}
else {
this.list = new ArrayList<>(list);
this.list = new LinkedList<>(list);
}
}

Expand Down

0 comments on commit 4b8331d

Please sign in to comment.