Use Immutable types for static final fields

Replace constants (static final CONSTANT_CASE) declaration type which use the general collection interface (e.g. List) with an immutable type (e.g. ImmutableList).

For constant field declarations, you should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List). This communicates to your callers important semantic guarantees ([]

For more info, see: []

Cleanup change automatically generated by javacflume/refactory
Refactoring: //third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns:MutableConstantField_refactoring
Tested:
    TAP --sample for global presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149061247
This commit is contained in:
Ben McIlwain 2017-03-02 16:22:21 -08:00
parent ee2bd594c8
commit 80f0910899

View file

@ -39,7 +39,6 @@ import google.registry.model.ofy.CommitLogManifest;
import google.registry.model.ofy.CommitLogMutation;
import google.registry.testing.FakeResponse;
import google.registry.testing.mapreduce.MapreduceTestCase;
import java.util.List;
import org.joda.time.DateTime;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -49,7 +48,8 @@ import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class KillAllCommitLogsActionTest extends MapreduceTestCase<KillAllCommitLogsAction> {
static final List<Class<? extends ImmutableObject>> AFFECTED_TYPES = ImmutableList.of(
static final ImmutableList<Class<? extends ImmutableObject>> AFFECTED_TYPES =
ImmutableList.of(
CommitLogBucket.class,
CommitLogCheckpoint.class,
CommitLogCheckpointRoot.class,