You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/02/27 06:41:49 UTC

[GitHub] [incubator-dolphinscheduler] CalvinKirs commented on a change in pull request #4896: [Improvement][Common] Optimize HashMap Initial Capacity

CalvinKirs commented on a change in pull request #4896:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4896#discussion_r584050411



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/BaseController.java
##########
@@ -48,7 +48,7 @@
      * @return check result code
      */
     public Map<String, Object> checkPageParams(int pageNo, int pageSize) {
-        Map<String, Object> result = new HashMap<>(2);
+        Map<String, Object> result = new HashMap<>(4);

Review comment:
       In my opinion, this doesn't actually make much sense. No matter if the initial capacity is 2 or 4




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