diff --git a/java/google/registry/model/eppcommon/ProtocolDefinition.java b/java/google/registry/model/eppcommon/ProtocolDefinition.java index a6b2dd351..cc1fb9933 100644 --- a/java/google/registry/model/eppcommon/ProtocolDefinition.java +++ b/java/google/registry/model/eppcommon/ProtocolDefinition.java @@ -35,7 +35,6 @@ import google.registry.model.domain.secdns.SecDnsCreateExtension; import google.registry.model.eppinput.EppInput.CommandExtension; import google.registry.model.eppoutput.EppResponse.ResponseExtension; import java.util.EnumSet; -import java.util.Set; import javax.xml.bind.annotation.XmlSchema; /** Constants that define the EPP protocol version we support. */ @@ -44,10 +43,11 @@ public class ProtocolDefinition { public static final String LANGUAGE = "en"; - public static final Set SUPPORTED_OBJECT_SERVICES = ImmutableSet.of( - "urn:ietf:params:xml:ns:host-1.0", - "urn:ietf:params:xml:ns:domain-1.0", - "urn:ietf:params:xml:ns:contact-1.0"); + public static final ImmutableSet SUPPORTED_OBJECT_SERVICES = + ImmutableSet.of( + "urn:ietf:params:xml:ns:host-1.0", + "urn:ietf:params:xml:ns:domain-1.0", + "urn:ietf:params:xml:ns:contact-1.0"); /** Enums repesenting valid service extensions that are recognized by the server. */ public enum ServiceExtension { diff --git a/java/google/registry/model/index/ForeignKeyIndex.java b/java/google/registry/model/index/ForeignKeyIndex.java index 2af0647a0..231f71464 100644 --- a/java/google/registry/model/index/ForeignKeyIndex.java +++ b/java/google/registry/model/index/ForeignKeyIndex.java @@ -62,9 +62,9 @@ public abstract class ForeignKeyIndex extends BackupGroup @Entity public static class ForeignKeyHostIndex extends ForeignKeyIndex {} - private static final Map< - Class, - Class>> RESOURCE_CLASS_TO_FKI_CLASS = + private static final ImmutableMap< + Class, Class>> + RESOURCE_CLASS_TO_FKI_CLASS = ImmutableMap., Class>>of( ContactResource.class, ForeignKeyContactIndex.class, DomainResource.class, ForeignKeyDomainIndex.class, diff --git a/java/google/registry/rde/RdeUploadUrl.java b/java/google/registry/rde/RdeUploadUrl.java index f52cb54e4..855ea8e95 100644 --- a/java/google/registry/rde/RdeUploadUrl.java +++ b/java/google/registry/rde/RdeUploadUrl.java @@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableMap; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URLEncoder; -import java.util.Map; import java.util.Objects; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; @@ -41,7 +40,8 @@ import javax.annotation.concurrent.Immutable; final class RdeUploadUrl implements Comparable { public static final Protocol SFTP = new Protocol("sftp", 22); - private static final Map ALLOWED_PROTOCOLS = ImmutableMap.of("sftp", SFTP); + private static final ImmutableMap ALLOWED_PROTOCOLS = + ImmutableMap.of("sftp", SFTP); private final Protocol protocol; private final URI uri; diff --git a/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java b/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java index ca1550fe8..013ed4aee 100644 --- a/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java +++ b/javatests/google/registry/tools/server/KillAllEppResourcesActionTest.java @@ -34,6 +34,7 @@ import static java.util.Arrays.asList; import com.google.appengine.api.datastore.Entity; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.googlecode.objectify.Key; import google.registry.model.EppResource; @@ -52,7 +53,6 @@ import google.registry.model.poll.PollMessage; import google.registry.model.reporting.HistoryEntry; import google.registry.testing.FakeResponse; import google.registry.testing.mapreduce.MapreduceTestCase; -import java.util.Set; import org.joda.money.CurrencyUnit; import org.joda.money.Money; import org.junit.Test; @@ -63,22 +63,23 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class KillAllEppResourcesActionTest extends MapreduceTestCase { - static final Set AFFECTED_KINDS = FluentIterable - .from(asList( - EppResourceIndex.class, - ForeignKeyContactIndex.class, - ForeignKeyDomainIndex.class, - ForeignKeyHostIndex.class, - DomainApplicationIndex.class, - DomainBase.class, - ContactResource.class, - HostResource.class, - HistoryEntry.class, - PollMessage.class, - BillingEvent.OneTime.class, - BillingEvent.Recurring.class)) - .transform(CLASS_TO_KIND_FUNCTION) - .toSet(); + static final ImmutableSet AFFECTED_KINDS = + FluentIterable.from( + asList( + EppResourceIndex.class, + ForeignKeyContactIndex.class, + ForeignKeyDomainIndex.class, + ForeignKeyHostIndex.class, + DomainApplicationIndex.class, + DomainBase.class, + ContactResource.class, + HostResource.class, + HistoryEntry.class, + PollMessage.class, + BillingEvent.OneTime.class, + BillingEvent.Recurring.class)) + .transform(CLASS_TO_KIND_FUNCTION) + .toSet(); private void runMapreduce() throws Exception { action = new KillAllEppResourcesAction();