Use Immutable types for static final fields

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149260890
This commit is contained in:
Ben McIlwain 2017-03-05 20:07:40 -08:00
parent 65fb0aee6a
commit c0e195e144
2 changed files with 2 additions and 3 deletions

View file

@ -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 * The TLD states during which we want to report a domain with pending applications as
* unavailable. * unavailable.
*/ */
private static final Set<TldState> PENDING_ALLOCATION_TLD_STATES = private static final ImmutableSet<TldState> PENDING_ALLOCATION_TLD_STATES =
Sets.immutableEnumSet(TldState.GENERAL_AVAILABILITY, TldState.QUIET_PERIOD); Sets.immutableEnumSet(TldState.GENERAL_AVAILABILITY, TldState.QUIET_PERIOD);
@Inject ResourceCommand resourceCommand; @Inject ResourceCommand resourceCommand;

View file

@ -22,7 +22,6 @@ import static java.util.Objects.hash;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.googlecode.objectify.annotation.Embed; import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject; import google.registry.model.ImmutableObject;
import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Objects; import java.util.Objects;
import javax.xml.bind.annotation.XmlAttribute; 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. */ /** A custom server launch phase that is defined using the "name" attribute. */
public static final LaunchPhase CUSTOM = create("custom", null); public static final LaunchPhase CUSTOM = create("custom", null);
private static final Map<String, LaunchPhase> LAUNCH_PHASES = initEnumMapping(); private static final ImmutableMap<String, LaunchPhase> LAUNCH_PHASES = initEnumMapping();
/** /**
* Returns a map of the static final fields to their values, case-converted. * Returns a map of the static final fields to their values, case-converted.