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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to