madrob commented on a change in pull request #1592: URL: https://github.com/apache/lucene-solr/pull/1592#discussion_r444325409
########## File path: solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java ########## @@ -191,7 +190,7 @@ public DocCollection getColl() throws InterruptedException, IOException { } Map<String, Object> props; synchronized (ri) { - props = new HashMap<>(ri.getVariables()); + props = new HashMap<String,Object>(ri.getVariables()); Review comment: I don't think we need this? ########## File path: solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java ########## @@ -542,7 +542,7 @@ private AutoScalingConfig handleSetTrigger(SolrQueryRequest req, SolrQueryRespon String eventTypeStr = op.getStr(EVENT); if (op.hasError()) return currentConfig; - TriggerEventType eventType = TriggerEventType.valueOf(eventTypeStr.trim().toUpperCase(Locale.ROOT)); + TriggerEventType.valueOf(eventTypeStr.trim().toUpperCase(Locale.ROOT)); Review comment: I think you can remove the whole line. ########## File path: solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java ########## @@ -2293,15 +2274,14 @@ public void simSetShardValue(String collection, String shard, String key, Object } } - @SuppressWarnings({"unchecked"}) public void simSetReplicaValues(String node, Map<String, Map<String, List<ReplicaInfo>>> source, boolean overwrite) { List<ReplicaInfo> infos = nodeReplicaMap.get(node); if (infos == null) { throw new RuntimeException("Node not present: " + node); } // core_node_name is not unique across collections - Map<String, Map<String, ReplicaInfo>> infoMap = new HashMap<>(); - infos.forEach(ri -> infoMap.computeIfAbsent(ri.getCollection(), Utils.NEW_HASHMAP_FUN).put(ri.getName(), ri)); + Map<String, Map<String, ReplicaInfo>> infoMap = new HashMap<String, Map<String, ReplicaInfo>>(); Review comment: `<>` is fine 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org