renatoh commented on code in PR #2197:
URL: https://github.com/apache/solr/pull/2197#discussion_r1486309875


##########
solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java:
##########
@@ -117,7 +117,7 @@ public class SearchHandler extends RequestHandlerBase
   private SolrCore core;
 
   protected List<String> getDefaultComponents() {
-    ArrayList<String> names = new ArrayList<>(8);
+    ArrayList<String> names = new ArrayList<>(9);

Review Comment:
   The way to do that would be also using the factory method List.of, the issue 
with that is that they create Read-Only list and we do add items to that list 
e.g. in org.apache.solr.handler.component.SearchHandler#initComponents.
   We could refactor that part so that we create a new list  rather than adding 
to the list returned by 
org.apache.solr.handler.component.SearchHandler#getDefaultComponents.
   What do you think?



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