Adapt to enabling error level for the AutoValueImmutableFields bug pattern AutoValue instances should be deeply immutable. Fix the current issues so that the build continues to work. Bug: Issue 15056 Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I082afcddae982705f9fb64f4f86cd460f3fdd2f7
diff --git a/src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java b/src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java index f61114e..080f279 100644 --- a/src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java +++ b/src/test/java/com/googlesource/gerrit/plugins/replication/TestUriUpdates.java
@@ -15,6 +15,7 @@ package com.googlesource.gerrit.plugins.replication; import com.google.auto.value.AutoValue; +import com.google.common.collect.ImmutableSet; import com.google.gerrit.entities.Project; import com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage.ReplicateRefUpdate; import java.net.URISyntaxException; @@ -34,7 +35,7 @@ public static TestUriUpdates create( Project.NameKey project, URIish uri, String remote, Set<String> refs) { - return new AutoValue_TestUriUpdates(project, uri, remote, refs); + return new AutoValue_TestUriUpdates(project, uri, remote, ImmutableSet.copyOf(refs)); } @Override @@ -47,5 +48,5 @@ public abstract String getRemoteName(); @Override - public abstract Set<String> getRefs(); + public abstract ImmutableSet<String> getRefs(); }