jonyangx commented on code in PR #2843:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2843#discussion_r1063940315


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/RemoteSubscribeEventProcessor.java:
##########
@@ -122,10 +125,15 @@ public void handler(HandlerService.HandlerSpecific 
handlerSpecific, HttpRequest
 
 
         // SubscriptionItem
-        List<SubscriptionItem> subscriptionList = 
Optional.ofNullable(JsonUtils.deserialize(
-            topic,
-            new TypeReference<List<SubscriptionItem>>() {}
-        )).orElseGet(Collections::emptyList);
+        List<SubscriptionItem> subscriptionList;

Review Comment:
   The code is redundant than before. @chenyi19851209 



##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/RemoteSubscribeEventProcessor.java:
##########
@@ -200,10 +208,15 @@ public void handler(HandlerService.HandlerSpecific 
handlerSpecific, HttpRequest
             String remoteResult = post(closeableHttpClient, targetMesh, 
builderRemoteHeaderMap(localAddress), remoteBodyMap,
                 response -> EntityUtils.toString(response.getEntity(), 
Constants.DEFAULT_CHARSET));
 
-            Map<String, String> remoteResultMap = 
Optional.ofNullable(JsonUtils.deserialize(
-                remoteResult,
-                new TypeReference<Map<String, String>>() {}
-            )).orElseGet(Maps::newHashMap);
+            Map<String, String> remoteResultMap;

Review Comment:
   The code is redundant than before. @chenyi19851209 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to