Changed arraylist to linkedlist

This commit is contained in:
Marcin Grzejszczak
2016-07-15 15:47:52 +02:00
parent a4328325c9
commit 1ec2bc7833

View File

@@ -16,8 +16,8 @@
package org.springframework.cloud.sleuth.stream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
@@ -53,7 +53,7 @@ public class StreamSpanReporter implements SpanReporter {
@InboundChannelAdapter(value = SleuthSource.OUTPUT)
public Spans poll() {
List<Span> result = new ArrayList<>();
List<Span> result = new LinkedList<>();
this.queue.drainTo(result);
for (Iterator<Span> iterator = result.iterator(); iterator.hasNext();) {
Span span = iterator.next();