squid:S1319 - Declarations should use Java collection interfaces such as List rather than specific implementation classes such as LinkedList

This commit is contained in:
Mohammed Ezzat
2016-02-22 19:39:26 +02:00
parent c580b61df3
commit e4c34b1e22
11 changed files with 23 additions and 15 deletions

View File

@ -101,7 +101,7 @@ public interface FluentIterable<E> extends Iterable<E> {
* @return a list with all objects of the given iterator
*/
static <E> List<E> copyToList(Iterable<E> iterable) {
ArrayList<E> copy = new ArrayList<>();
List<E> copy = new ArrayList<>();
Iterator<E> iterator = iterable.iterator();
while (iterator.hasNext()) {
copy.add(iterator.next());