diff --git a/java/google/registry/cron/TldFanoutAction.java b/java/google/registry/cron/TldFanoutAction.java index bb67a159b..6df61a35b 100644 --- a/java/google/registry/cron/TldFanoutAction.java +++ b/java/google/registry/cron/TldFanoutAction.java @@ -79,14 +79,15 @@ public final class TldFanoutAction implements Runnable { private static final String JITTER_SECONDS_PARAM = "jitterSeconds"; /** A set of control params to TldFanoutAction that aren't passed down to the executing action. */ - private static final Set CONTROL_PARAMS = ImmutableSet.of( - ENDPOINT_PARAM, - QUEUE_PARAM, - FOR_EACH_REAL_TLD_PARAM, - FOR_EACH_TEST_TLD_PARAM, - RUN_IN_EMPTY_PARAM, - EXCLUDE_PARAM, - JITTER_SECONDS_PARAM); + private static final ImmutableSet CONTROL_PARAMS = + ImmutableSet.of( + ENDPOINT_PARAM, + QUEUE_PARAM, + FOR_EACH_REAL_TLD_PARAM, + FOR_EACH_TEST_TLD_PARAM, + RUN_IN_EMPTY_PARAM, + EXCLUDE_PARAM, + JITTER_SECONDS_PARAM); private static final String TLD_PATHARG = ":tld"; private static final Random random = new Random(); diff --git a/java/google/registry/model/domain/rgp/GracePeriodStatus.java b/java/google/registry/model/domain/rgp/GracePeriodStatus.java index 6a8b509ae..ab0c85a6f 100644 --- a/java/google/registry/model/domain/rgp/GracePeriodStatus.java +++ b/java/google/registry/model/domain/rgp/GracePeriodStatus.java @@ -19,11 +19,11 @@ import static com.google.common.base.Predicates.not; import static java.util.Arrays.asList; import com.google.common.base.Function; +import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import google.registry.model.translators.EnumToAttributeAdapter; import google.registry.model.translators.EnumToAttributeAdapter.EppEnum; -import java.util.Map; import javax.annotation.Nullable; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @@ -100,7 +100,7 @@ public enum GracePeriodStatus implements EppEnum { TRANSFER("transferPeriod"); /** Provide a quick lookup of GracePeriodStatus from XML name. */ - private static final Map XML_NAME_TO_GRACE_PERIOD_STATUS = + private static final ImmutableMap XML_NAME_TO_GRACE_PERIOD_STATUS = Maps.uniqueIndex( // SUNRUSH_ADD isn't a real grace period type visible in EPP XML, so exclude it. Iterables.filter(asList(GracePeriodStatus.values()), not(equalTo(SUNRUSH_ADD))), diff --git a/java/google/registry/monitoring/whitebox/MetricsExportAction.java b/java/google/registry/monitoring/whitebox/MetricsExportAction.java index 9a03473e9..19ac025d4 100644 --- a/java/google/registry/monitoring/whitebox/MetricsExportAction.java +++ b/java/google/registry/monitoring/whitebox/MetricsExportAction.java @@ -39,7 +39,6 @@ import google.registry.request.ParameterMap; import google.registry.util.FormattingLogger; import java.io.IOException; import java.util.Map; -import java.util.Set; import javax.inject.Inject; /** Action for exporting metrics to BigQuery. */ @@ -49,7 +48,7 @@ public class MetricsExportAction implements Runnable { public static final String PATH = "/_dr/task/metrics"; private static final FormattingLogger logger = getLoggerForCallerClass(); private static final String DATASET_ID = "metrics"; - private static final Set SPECIAL_PARAMS = ImmutableSet.of("tableId", "insertId"); + private static final ImmutableSet SPECIAL_PARAMS = ImmutableSet.of("tableId", "insertId"); @Inject @Parameter("tableId") String tableId; @Inject @Parameter("insertId") String insertId;