You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/31 14:39:55 UTC

[incubator-eventmesh] branch master updated: Used entrySet in place of keySet in UnSubscribeProcessor

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

mikexue 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 19824e43 Used entrySet in place of keySet in UnSubscribeProcessor
     new d65487f2 Merge pull request #2050 from logesr/master
19824e43 is described below

commit 19824e43d89dfc444f975cb2464d24e8cc497487
Author: logesr <lo...@thoughtworks.com>
AuthorDate: Mon Oct 31 19:22:20 2022 +0530

    Used entrySet in place of keySet in UnSubscribeProcessor
---
 .../runtime/core/protocol/http/processor/UnSubscribeProcessor.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java
index 43eeb383..d7d697f8 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/UnSubscribeProcessor.java
@@ -178,15 +178,15 @@ public class UnSubscribeProcessor implements HttpRequestProcessor {
                                 eventMeshHTTPServer.localConsumerGroupMapping.get(consumerGroup);
                         Map<String, ConsumerGroupTopicConf> map =
                                 consumerGroupConf.getConsumerGroupTopicConf();
-                        for (String topicKey : map.keySet()) {
+                        for (Map.Entry<String, ConsumerGroupTopicConf> topicConf : map.entrySet()) {
                             // only modify the topic to subscribe
-                            if (StringUtils.equals(unSubTopic, topicKey)) {
+                            if (StringUtils.equals(unSubTopic, topicConf.getKey())) {
                                 ConsumerGroupTopicConf latestTopicConf =
                                         new ConsumerGroupTopicConf();
                                 latestTopicConf.setConsumerGroup(consumerGroup);
                                 latestTopicConf.setTopic(unSubTopic);
                                 latestTopicConf
-                                        .setSubscriptionItem(map.get(topicKey).getSubscriptionItem());
+                                        .setSubscriptionItem(topicConf.getValue().getSubscriptionItem());
                                 latestTopicConf.setUrls(clientUrls);
 
                                 latestTopicConf.setIdcUrls(idcUrls);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org