Alonexc commented on code in PR #3220:
URL: 
https://github.com/apache/incubator-eventmesh/pull/3220#discussion_r1113700922


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SendAsyncMessageProcessor.java:
##########
@@ -310,10 +310,11 @@ public void processRequest(ChannelHandlerContext ctx, 
AsyncContext<HttpCommand>
 
                     @Override
                     public void onSuccess(SendResult sendResult) {
+                        StringBuilder sb = new StringBuilder();
                         HttpCommand succ = request.createHttpCommandResponse(
                             sendMessageResponseHeader,
                             
SendMessageResponseBody.buildBody(EventMeshRetCode.SUCCESS.getRetCode(),
-                                EventMeshRetCode.SUCCESS.getErrMsg() + 
sendResult.toString()));
+                                EventMeshRetCode.SUCCESS.getErrMsg() + 
sb.append(sendResult.toString())));

Review Comment:
   This issue is mainly to solve the NPE generated by the .toString() method, 
and your change like this does not seem to solve the problem. So I suggest just 
removing .toString(), what do you think?



-- 
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