You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/06/22 08:49:19 UTC

[GitHub] [lucene-solr] noblepaul commented on a change in pull request #1592: SOLR-14579 First pass at dismantling Utils

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:
users@infra.apache.org



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