mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02: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:
parent
2c96633a20
commit
53ed6035c4
1 changed files with 3 additions and 2 deletions
|
@ -44,11 +44,12 @@ import com.google.common.net.MediaType;
|
||||||
import google.registry.dns.DnsConstants;
|
import google.registry.dns.DnsConstants;
|
||||||
import google.registry.model.ImmutableObject;
|
import google.registry.model.ImmutableObject;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
@ -232,7 +233,7 @@ public class TaskQueueHelper {
|
||||||
throws Exception {
|
throws Exception {
|
||||||
QueueStateInfo qsi = getQueueInfo(queueName);
|
QueueStateInfo qsi = getQueueInfo(queueName);
|
||||||
assertThat(qsi.getTaskInfo()).hasSize(taskMatchers.size());
|
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) {
|
for (final TaskMatcher taskMatcher : taskMatchers) {
|
||||||
try {
|
try {
|
||||||
taskInfos.remove(taskInfos.stream().filter(taskMatcher).findFirst().get());
|
taskInfos.remove(taskInfos.stream().filter(taskMatcher).findFirst().get());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue