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/27 07:55:31 UTC
[incubator-eventmesh] branch master updated: Replace keySet iterator with entrySet
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 1a90a18b Replace keySet iterator with entrySet
new 2e5b8fa7 Merge pull request #1945 from DeepikaMarthandanTW/Enhancement_1724_patch
1a90a18b is described below
commit 1a90a18bd26d54f99925a51a526a7d25f9b61175
Author: Deepika Marthandan <96...@users.noreply.github.com>
AuthorDate: Wed Oct 26 22:03:08 2022 +0530
Replace keySet iterator with entrySet
---
.../runtime/core/protocol/http/push/AsyncHTTPPushRequest.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java
index 7fc384eb..a2e5cdee 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push/AsyncHTTPPushRequest.java
@@ -139,10 +139,11 @@ public class AsyncHTTPPushRequest extends AbstractHTTPPushRequest {
} else {
HttpEventWrapper httpEventWrapper = (HttpEventWrapper) protocolTransportObject;
Map<String, Object> sysHeaderMap = httpEventWrapper.getSysHeaderMap();
+ Set<Map.Entry<String, Object>> sysHeaderMapEntry = sysHeaderMap.entrySet();
content = new String(httpEventWrapper.getBody(), StandardCharsets.UTF_8);
- for (String header : sysHeaderMap.keySet()) {
- if (!builder.containsHeader(header)) {
- builder.addHeader(header, sysHeaderMap.get(header).toString());
+ for (Map.Entry<String, Object> header : sysHeaderMapEntry) {
+ if (!builder.containsHeader(header.getKey())) {
+ builder.addHeader(header.getKey(), header.getValue().toString());
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org