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/26 13:43:02 UTC
[incubator-eventmesh] branch master updated: [ISSUE #1725] use entrySet replace key set iterator
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 cca31c3f [ISSUE #1725] use entrySet replace key set iterator
new a39c0c60 Merge pull request #1913 from jayabha-jayas/master
cca31c3f is described below
commit cca31c3f905c42eb497813bd19a18467da9a5459
Author: jayabharathi-jb <ja...@gmail.com>
AuthorDate: Wed Oct 26 18:43:02 2022 +0530
[ISSUE #1725] use entrySet replace key set iterator
---
.../protocol/http/processor/LocalUnSubscribeEventProcessor.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/LocalUnSubscribeEventProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/LocalUnSubscribeEventProcessor.java
index 45482892..405ff5db 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/LocalUnSubscribeEventProcessor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/LocalUnSubscribeEventProcessor.java
@@ -176,15 +176,16 @@ public class LocalUnSubscribeEventProcessor extends AbstractEventProcessor imple
eventMeshHTTPServer.localConsumerGroupMapping.get(consumerGroup);
Map<String, ConsumerGroupTopicConf> map =
consumerGroupConf.getConsumerGroupTopicConf();
- for (String topicKey : map.keySet()) {
+ Set<Map.Entry<String, ConsumerGroupTopicConf>> entryMap = map.entrySet();
+ for (Map.Entry<String, ConsumerGroupTopicConf> entry : entryMap) {
// only modify the topic to subscribe
- if (StringUtils.equals(unSubTopic, topicKey)) {
+ if (StringUtils.equals(unSubTopic, entry.getKey())) {
ConsumerGroupTopicConf latestTopicConf =
new ConsumerGroupTopicConf();
latestTopicConf.setConsumerGroup(consumerGroup);
latestTopicConf.setTopic(unSubTopic);
latestTopicConf
- .setSubscriptionItem(map.get(topicKey).getSubscriptionItem());
+ .setSubscriptionItem(entry.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