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

dockerzhang pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/release-1.3.0 by this push:
     new 660db7ce3 [INLONG-5998][Manager] Only lower case allowed for source 
name (#5999)
660db7ce3 is described below

commit 660db7ce35a291ca1b88fbf3784dccfff17a776e
Author: woofyzhao <490467...@qq.com>
AuthorDate: Fri Sep 23 11:46:45 2022 +0800

    [INLONG-5998][Manager] Only lower case allowed for source name (#5999)
---
 .../org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
index 111035c87..d091bdf7e 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
@@ -55,6 +55,7 @@ import 
org.springframework.transaction.annotation.Transactional;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.Locale;
 import java.util.Objects;
 import java.util.stream.Collectors;
 
@@ -264,7 +265,8 @@ public class AgentServiceImpl implements AgentService {
             fileEntity.setExtParams(sourceEntity.getExtParams());
             fileEntity.setAgentIp(agentIp);
             fileEntity.setUuid(uuid);
-            fileEntity.setSourceName(fileEntity.getSourceName() + "-" + 
RandomStringUtils.randomAlphanumeric(10));
+            fileEntity.setSourceName(fileEntity.getSourceName() + "-"
+                    + 
RandomStringUtils.randomAlphanumeric(10).toLowerCase(Locale.ROOT));
             fileEntity.setTemplateId(sourceEntity.getId());
             int nextStatus = getNextStatus(fileEntity.getStatus());
             fileEntity.setStatus(nextStatus);

Reply via email to