madrob commented on a change in pull request #207:
URL: https://github.com/apache/solr/pull/207#discussion_r667416866



##########
File path: 
solr/core/src/java/org/apache/solr/handler/admin/ContainerPluginsApi.java
##########
@@ -176,13 +176,14 @@ private void validateConfig(PayloadObj<PluginMeta> 
payload, PluginMeta info) thr
     }
   }
 
-  @SuppressWarnings({"rawtypes", "unchecked"})
   private void persistPlugins(Function<Map<String,Object>, Map<String,Object>> 
modifier) throws IOException {
     try {
       zkClientSupplier.get().atomicUpdate(ZkStateReader.CLUSTER_PROPS, bytes 
-> {
-        Map rawJson = bytes == null ? new LinkedHashMap<>() :
-            (Map) Utils.fromJSON(bytes);
-        Map pluginsModified = modifier.apply((Map) 
rawJson.computeIfAbsent(PLUGIN, o -> new LinkedHashMap<>()));
+        @SuppressWarnings("unchecked")
+        Map<String, Object> rawJson = bytes == null ? new LinkedHashMap<>() :
+            (Map<String, Object>) Utils.fromJSON(bytes);
+        @SuppressWarnings("unchecked")
+        Map<?, ?> pluginsModified = modifier.apply((Map<String, Object>) 
rawJson.computeIfAbsent(PLUGIN, o -> new LinkedHashMap<>()));

Review comment:
       I don't think this declaration matters here.




-- 
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