1
0
mirror of https://github.com/google/nomulus synced 2026-01-10 16:00:52 +00:00

Replace LinkedList with ArrayList

ArrayList is more performant and there's no reason to use a LinkedList here.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179717525
This commit is contained in:
mcilwain
2017-12-20 12:12:19 -08:00
committed by Ben McIlwain
parent 2c96633a20
commit 53ed6035c4

View File

@@ -44,11 +44,12 @@ import com.google.common.net.MediaType;
import google.registry.dns.DnsConstants;
import google.registry.model.ImmutableObject;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
@@ -232,7 +233,7 @@ public class TaskQueueHelper {
throws Exception {
QueueStateInfo qsi = getQueueInfo(queueName);
assertThat(qsi.getTaskInfo()).hasSize(taskMatchers.size());
LinkedList<TaskStateInfo> taskInfos = new LinkedList<>(qsi.getTaskInfo());
List<TaskStateInfo> taskInfos = new ArrayList<>(qsi.getTaskInfo());
for (final TaskMatcher taskMatcher : taskMatchers) {
try {
taskInfos.remove(taskInfos.stream().filter(taskMatcher).findFirst().get());