Commit 11f7191d authored by Stein Eldar Johnsen's avatar Stein Eldar Johnsen 💬

Swap from LinkedList to ArrayList in many places.

parent f0d9e73d
......@@ -5,7 +5,7 @@ import net.morimekta.testing.time.FakeClock;
import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.TreeSet;
......@@ -386,7 +386,7 @@ public class FakeScheduledExecutor implements ScheduledExecutorService, FakeCloc
throw new IllegalArgumentException("Empty invoke collection");
}
List<Future<T>> results = new LinkedList<>();
List<Future<T>> results = new ArrayList<>();
for (Callable<T> c : collection) {
results.add(submit(c));
}
......
......@@ -3,7 +3,7 @@ package net.morimekta.testing.concurrent;
import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
......@@ -126,7 +126,7 @@ public class ImmediateExecutor implements ExecutorService {
throw new IllegalStateException("Executor is shut down");
}
List<Future<T>> results = new LinkedList<>();
List<Future<T>> results = new ArrayList<>();
for (Callable<T> c : collection) {
results.add(submit(c));
}
......
......@@ -25,7 +25,7 @@ import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
import java.util.LinkedList;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
......@@ -130,7 +130,7 @@ public class FakeClock extends Clock {
this(new AtomicReference<>(now),
new AtomicReference<>(now),
systemUTC.getZone(),
new LinkedList<>(),
new ArrayList<>(),
new AtomicBoolean());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment