You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/08/21 12:18:16 UTC
[incubator-servicecomb-saga] branch master updated: SCB-855 fix
computeIfAbsent rewrite infinite loop error
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git
The following commit(s) were added to refs/heads/master by this push:
new 84194af SCB-855 fix computeIfAbsent rewrite infinite loop error
84194af is described below
commit 84194afba716203a8d67a7876e446899dd5fcd17
Author: KomachiSion <26...@qq.com>
AuthorDate: Tue Aug 21 18:01:59 2018 +0800
SCB-855 fix computeIfAbsent rewrite infinite loop error
---
.../org/apache/servicecomb/saga/format/JacksonRestOperation.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/saga-format/src/main/java/org/apache/servicecomb/saga/format/JacksonRestOperation.java b/saga-format/src/main/java/org/apache/servicecomb/saga/format/JacksonRestOperation.java
index 10876fa..c292168 100644
--- a/saga-format/src/main/java/org/apache/servicecomb/saga/format/JacksonRestOperation.java
+++ b/saga-format/src/main/java/org/apache/servicecomb/saga/format/JacksonRestOperation.java
@@ -53,10 +53,9 @@ class JacksonRestOperation extends RestOperation implements TransportAware {
Map<String, Map<String, String>> updated = new HashMap<>(params());
// This is not thread safe
if (updated.get("form") == null) {
- HashMap<String, String> formMap = new HashMap<>();
- formMap.put("response", response.body());
- updated.put("form", formMap);
+ updated.put("form", new HashMap<String, String>());
}
+ updated.get("form").put("response", response.body());
return transport.with(
address,