You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/17 09:08:26 UTC

[GitHub] [flink] GJL commented on a change in pull request #10882: [FLINK-15628][rest]Fix initialize webSubmissionHandlers list in WebSu…

GJL commented on a change in pull request #10882: [FLINK-15628][rest]Fix initialize webSubmissionHandlers list in WebSu…
URL: https://github.com/apache/flink/pull/10882#discussion_r367831834
 
 

 ##########
 File path: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebSubmissionExtension.java
 ##########
 @@ -61,7 +61,7 @@ public WebSubmissionExtension(
 			Executor executor,
 			Time timeout) throws Exception {
 
-		webSubmissionHandlers = new ArrayList<>(5);
+		webSubmissionHandlers = new ArrayList<>(6);
 
 Review comment:
   I think the following rule applies here. I would suggest to get rid of the capacity altogether.
   
   > Set the initial capacity for a collection only if there is a good proven reason for that, otherwise do not clutter the code. In case of Maps it can be even deluding because the Map’s load factor effectively reduces the capacity.
   
   https://flink.apache.org/contributing/code-style-and-quality-java.html#collections
   
   

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


With regards,
Apache Git Services