shenyu-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-shenyu] en-o commented on a change in pull request #1830: refactor plugin-modify-response : Finishing method.
Date Thu, 29 Jul 2021 15:56:45 GMT

en-o commented on a change in pull request #1830:
URL: https://github.com/apache/incubator-shenyu/pull/1830#discussion_r679282707



##########
File path: shenyu-plugin/shenyu-plugin-modify-response/src/main/java/org/apache/shenyu/plugin/modify/response/ModifyResponsePlugin.java
##########
@@ -175,14 +175,6 @@ public Boolean skip(final ServerWebExchange exchange) {
         private String operation(final String jsonValue, final ModifyResponseRuleHandle handle)
{
             DocumentContext context = JsonPath.parse(jsonValue);
             operation(context, handle);
-            if (!CollectionUtils.isEmpty(handle.getReplaceBodyKeys())) {
-                handle.getReplaceBodyKeys().forEach(info -> {
-                    context.renameKey(info.getPath(), info.getKey(), info.getValue());
-                });
-            }
-            if (!CollectionUtils.isEmpty(handle.getRemoveBodyKeys())) {
-                handle.getRemoveBodyKeys().forEach(context::delete);
-            }
             return context.jsonString();
         }

Review comment:
       Idea prompted me. I thought the line was too long after I changed it, so I changed
it back. 😅 (changed)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message