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

chenguangsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new aa092440a fixes #2728
     new ac47b70fb Merge pull request #2800 from mvadharia/master
aa092440a is described below

commit aa092440a65640855cfe90a9c66d0b4d0b6482b8
Author: mvadharia <[email protected]>
AuthorDate: Tue Jan 3 10:31:24 2023 +0530

    fixes #2728
---
 .../core/protocol/http/processor/SubscribeProcessor.java    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
 
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
index ef0d5ad37..716dc5f44 100644
--- 
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
+++ 
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
@@ -202,13 +202,14 @@ public class SubscribeProcessor implements 
HttpRequestProcessor {
 
                 Map<String, List<String>> idcUrls = new HashMap<>();
                 for (Client client : groupTopicClients) {
-                    if (idcUrls.containsKey(client.getIdc())) {
-                        
idcUrls.get(client.getIdc()).add(StringUtils.deleteWhitespace(client.getUrl()));
-                    } else {
-                        List<String> urls = new ArrayList<>();
-                        urls.add(client.getUrl());
-                        idcUrls.put(client.getIdc(), urls);
+                    String idc = client.getIdc();
+                    String urlVal = 
StringUtils.deleteWhitespace(client.getUrl());
+                    List<String> urls = idcUrls.get(idc);
+                    if (urls == null) {
+                        urls = new ArrayList<>();
+                        idcUrls.put(idc, urls);
                     }
+                    urls.add(urlVal);
                 }
                 ConsumerGroupConf consumerGroupConf =
                     
eventMeshHTTPServer.localConsumerGroupMapping.get(consumerGroup);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to