You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/01/27 03:19:27 UTC

[incubator-seatunnel] branch dev updated: [Improve] Use the correct init size for StringTemplate (#1172)

This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new ab3c71a  [Improve] Use the correct init size for StringTemplate (#1172)
ab3c71a is described below

commit ab3c71afedbb18254b53ac93764e5c7bed6208ae
Author: Benedict Jin <as...@apache.org>
AuthorDate: Thu Jan 27 11:19:21 2022 +0800

    [Improve] Use the correct init size for StringTemplate (#1172)
---
 .../src/main/java/org/apache/seatunnel/common/utils/StringTemplate.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/StringTemplate.java b/seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/StringTemplate.java
index 4897e52..f955b2d 100644
--- a/seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/StringTemplate.java
+++ b/seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/StringTemplate.java
@@ -37,7 +37,7 @@ public class StringTemplate {
         final SimpleDateFormat sdf = new SimpleDateFormat(timeFormat);
         final String formattedDate = sdf.format(new Date());
 
-        final Map<String, String> valuesMap = new HashMap(5);
+        final Map<String, String> valuesMap = new HashMap(3);
         valuesMap.put("uuid", UUID.randomUUID().toString());
         valuesMap.put("now", formattedDate);
         valuesMap.put(timeFormat, formattedDate);