You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2021/09/26 02:46:41 UTC

[incubator-shenyu] branch master updated: polish (#2131)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2cff85a  polish (#2131)
2cff85a is described below

commit 2cff85a6ff45edb70229da702d9268ddd6f94c18
Author: dengliming <li...@gmail.com>
AuthorDate: Sun Sep 26 10:46:35 2021 +0800

    polish (#2131)
    
    * code polish
    
    * code polish
---
 .../java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java b/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
index f6514d2..a3bb9db 100644
--- a/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
+++ b/shenyu-plugin/shenyu-plugin-motan/src/main/java/org/apache/shenyu/plugin/motan/proxy/MotanProxyService.java
@@ -67,8 +67,8 @@ public class MotanProxyService {
         } else {
             int num = motanParamInfo.getParamTypes().length;
             params = new Object[num];
+            Map<String, Object> bodyMap = GsonUtils.getInstance().convertToMap(body);
             for (int i = 0; i < num; i++) {
-                Map<String, Object> bodyMap = GsonUtils.getInstance().convertToMap(body);
                 params[i] = bodyMap.get(motanParamInfo.getParamNames()[i]).toString();
             }
         }
@@ -77,7 +77,7 @@ public class MotanProxyService {
         try {
             responseFuture = (ResponseFuture) commonHandler.asyncCall(metaData.getMethodName(), params, Object.class);
         } catch (Throwable e) {
-            LOG.error("Exception caught in MotanProxyService#genericInvoker.");
+            LOG.error("Exception caught in MotanProxyService#genericInvoker.", e);
             return null;
         }
         //CHECKSTYLE:ON IllegalCatch