Use singletonList instead of ArrayList.
This emphasizes that we don't mutate it.
RELNOTES=n/a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=322567775
diff --git a/core/src/main/java/com/google/common/truth/MapSubject.java b/core/src/main/java/com/google/common/truth/MapSubject.java
index 24e5855..40158ac 100644
--- a/core/src/main/java/com/google/common/truth/MapSubject.java
+++ b/core/src/main/java/com/google/common/truth/MapSubject.java
@@ -25,6 +25,7 @@
import static com.google.common.truth.SubjectUtils.hasMatchingToStringPair;
import static com.google.common.truth.SubjectUtils.objectToTypeName;
import static com.google.common.truth.SubjectUtils.retainMatchingToString;
+import static java.util.Collections.singletonList;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
@@ -110,8 +111,8 @@
public final void containsEntry(@NullableDecl Object key, @NullableDecl Object value) {
Map.Entry<Object, Object> entry = immutableEntry(key, value);
if (!actual.entrySet().contains(entry)) {
- List<Object> keyList = Lists.newArrayList(key);
- List<Object> valueList = Lists.newArrayList(value);
+ List<Object> keyList = singletonList(key);
+ List<Object> valueList = singletonList(value);
if (actual.containsKey(key)) {
Object actualValue = actual.get(key);
/*