noblepaul commented on a change in pull request #1592:
URL: https://github.com/apache/lucene-solr/pull/1592#discussion_r443408369



##########
File path: 
solr/core/src/java/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java
##########
@@ -351,10 +340,10 @@ public void simSetClusterState(ClusterState initialState) 
throws Exception {
         // DocCollection will be created later
         collectionsStatesRef.put(dc.getName(), new 
CachedCollectionRef(dc.getName(), dc.getZNodeVersion()));
         collProperties.computeIfAbsent(dc.getName(), name -> new 
ConcurrentHashMap<>()).putAll(dc.getProperties());
-        opDelays.computeIfAbsent(dc.getName(), 
Utils.NEW_HASHMAP_FUN).putAll(defaultOpDelays);
+        opDelays.computeIfAbsent(dc.getName(), o -> new 
HashMap<String,Long>()).putAll(defaultOpDelays);

Review comment:
       This was added for a purpose.
   `o -> new HashMap<String,Long>()` 
   
   this creates a new lambda class. 
   OTOH `Utils.NEW_HASHMAP_FUN` is created once and reused everywhere
   
   
   




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

Reply via email to