From c0e195e1444a74c384dd4f054ea5cbeefcf27e30 Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Sun, 5 Mar 2017 20:07:40 -0800 Subject: [PATCH] Use Immutable types for static final fields ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149260890 --- java/google/registry/flows/domain/DomainCheckFlow.java | 2 +- java/google/registry/model/domain/launch/LaunchPhase.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/java/google/registry/flows/domain/DomainCheckFlow.java b/java/google/registry/flows/domain/DomainCheckFlow.java index 1a3688187..e42d27af5 100644 --- a/java/google/registry/flows/domain/DomainCheckFlow.java +++ b/java/google/registry/flows/domain/DomainCheckFlow.java @@ -98,7 +98,7 @@ public final class DomainCheckFlow implements Flow { * The TLD states during which we want to report a domain with pending applications as * unavailable. */ - private static final Set PENDING_ALLOCATION_TLD_STATES = + private static final ImmutableSet PENDING_ALLOCATION_TLD_STATES = Sets.immutableEnumSet(TldState.GENERAL_AVAILABILITY, TldState.QUIET_PERIOD); @Inject ResourceCommand resourceCommand; diff --git a/java/google/registry/model/domain/launch/LaunchPhase.java b/java/google/registry/model/domain/launch/LaunchPhase.java index ed8292755..3c1c3f226 100644 --- a/java/google/registry/model/domain/launch/LaunchPhase.java +++ b/java/google/registry/model/domain/launch/LaunchPhase.java @@ -22,7 +22,6 @@ import static java.util.Objects.hash; import com.google.common.collect.ImmutableMap; import com.googlecode.objectify.annotation.Embed; import google.registry.model.ImmutableObject; -import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import javax.xml.bind.annotation.XmlAttribute; @@ -64,7 +63,7 @@ public class LaunchPhase extends ImmutableObject { /** A custom server launch phase that is defined using the "name" attribute. */ public static final LaunchPhase CUSTOM = create("custom", null); - private static final Map LAUNCH_PHASES = initEnumMapping(); + private static final ImmutableMap LAUNCH_PHASES = initEnumMapping(); /** * Returns a map of the static final fields to their values, case-converted.