From c496f369c1247becc3a4b8a16bdd4a88990130ab Mon Sep 17 00:00:00 2001 From: kak Date: Tue, 6 Dec 2016 12:11:03 -0800 Subject: [PATCH] Prefer Multimap interface types over implementation types. This change is required before the migration to MultimapBuilder can be completed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=141208944 --- java/google/registry/dns/ReadDnsQueueAction.java | 3 ++- javatests/google/registry/testing/UriParameters.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/java/google/registry/dns/ReadDnsQueueAction.java b/java/google/registry/dns/ReadDnsQueueAction.java index fe5899056..39843da52 100644 --- a/java/google/registry/dns/ReadDnsQueueAction.java +++ b/java/google/registry/dns/ReadDnsQueueAction.java @@ -32,6 +32,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; +import com.google.common.collect.SortedSetMultimap; import com.google.common.collect.TreeMultimap; import google.registry.config.ConfigModule.Config; import google.registry.dns.DnsConstants.TargetType; @@ -121,7 +122,7 @@ public final class ReadDnsQueueAction implements Runnable { // each TLD will be grouped together, and domains and hosts will be grouped within a TLD. The // grouping and ordering of domains and hosts is not technically necessary, but a predictable // ordering makes it possible to write detailed tests. - TreeMultimap refreshItemMultimap = TreeMultimap.create(); + SortedSetMultimap refreshItemMultimap = TreeMultimap.create(); // Read all tasks on the DNS pull queue and load them into the refresh item multimap. for (TaskHandle task : tasks) { try { diff --git a/javatests/google/registry/testing/UriParameters.java b/javatests/google/registry/testing/UriParameters.java index 4d8081269..f626444db 100644 --- a/javatests/google/registry/testing/UriParameters.java +++ b/javatests/google/registry/testing/UriParameters.java @@ -37,7 +37,7 @@ public final class UriParameters { */ public static ListMultimap parse(String query) { checkNotNull(query); - ArrayListMultimap map = ArrayListMultimap.create(); + ListMultimap map = ArrayListMultimap.create(); if (!query.isEmpty()) { int start = 0; while (start <= query.length()) {