You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "mkhludnev (via GitHub)" <gi...@apache.org> on 2023/03/17 20:06:38 UTC

[GitHub] [solr] mkhludnev commented on a diff in pull request #1466: WIP Remove Guava usages

mkhludnev commented on code in PR #1466:
URL: https://github.com/apache/solr/pull/1466#discussion_r1140611348


##########
solr/core/src/java/org/apache/solr/core/RequestParams.java:
##########
@@ -222,13 +222,15 @@ public static class ParamSet implements MapSerializable {
       this.defaults = defaults;
       this.invariants = invariants;
       this.appends = appends;
-      ImmutableMap.Builder<String, VersionedParams> builder =
-          ImmutableMap.<String, VersionedParams>builder()
-              .put(PluginInfo.DEFAULTS, new VersionedParams(defaults, this));
-      if (appends != null) builder.put(PluginInfo.APPENDS, new VersionedParams(appends, this));
-      if (invariants != null)
+      Map<String, VersionedParams> builder = new HashMap<>();
+      builder.put(PluginInfo.DEFAULTS, new VersionedParams(defaults, this));
+      if (appends != null) {
+        builder.put(PluginInfo.APPENDS, new VersionedParams(appends, this));
+      }
+      if (invariants != null) {
         builder.put(PluginInfo.INVARIANTS, new VersionedParams(invariants, this));
-      paramsMap = builder.build();
+      }
+      paramsMap = Map.copyOf(builder);

Review Comment:
   Well, it seems like it was immutable. But it turns to be mutable now. is it ok?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org