From 80f09108994288a31b7ae0bb77f2c7bb531f8ed1 Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Thu, 2 Mar 2017 16:22:21 -0800 Subject: [PATCH] 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 --- .../tools/server/KillAllCommitLogsActionTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/javatests/google/registry/tools/server/KillAllCommitLogsActionTest.java b/javatests/google/registry/tools/server/KillAllCommitLogsActionTest.java index 57064bd87..1d68b960c 100644 --- a/javatests/google/registry/tools/server/KillAllCommitLogsActionTest.java +++ b/javatests/google/registry/tools/server/KillAllCommitLogsActionTest.java @@ -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,12 +48,13 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class KillAllCommitLogsActionTest extends MapreduceTestCase { - static final List> AFFECTED_TYPES = ImmutableList.of( - CommitLogBucket.class, - CommitLogCheckpoint.class, - CommitLogCheckpointRoot.class, - CommitLogMutation.class, - CommitLogManifest.class); + static final ImmutableList> AFFECTED_TYPES = + ImmutableList.of( + CommitLogBucket.class, + CommitLogCheckpoint.class, + CommitLogCheckpointRoot.class, + CommitLogMutation.class, + CommitLogManifest.class); private void runMapreduce() throws Exception { action = new KillAllCommitLogsAction();