From 7738f98c2960ad5869cf85a5f795b2041fd10910 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 21 Dec 2018 10:11:04 +0900 Subject: [PATCH] ConfigUpdatedEvent: Use immutable type in field declaration Error Prone reports [1] that a field initialized to hold an immutable collection should be declared using the immutable type itself. [1] https://errorprone.info/bugpattern/MutableConstantField Change-Id: I8058a45ad1c757671168ff237cecdedad04e8760 --- java/com/google/gerrit/server/config/ConfigUpdatedEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/com/google/gerrit/server/config/ConfigUpdatedEvent.java b/java/com/google/gerrit/server/config/ConfigUpdatedEvent.java index a7aff83eba..b37e489a50 100644 --- a/java/com/google/gerrit/server/config/ConfigUpdatedEvent.java +++ b/java/com/google/gerrit/server/config/ConfigUpdatedEvent.java @@ -37,7 +37,7 @@ import org.eclipse.jgit.lib.Config; * (+ various overloaded versions of these) */ public class ConfigUpdatedEvent { - public static final Multimap NO_UPDATES = + public static final ImmutableMultimap NO_UPDATES = new ImmutableMultimap.Builder().build(); private final Config oldConfig; private final Config newConfig;