funky-eyes commented on code in PR #7451:
URL: https://github.com/apache/incubator-seata/pull/7451#discussion_r2157243110


##########
core/src/main/java/org/apache/seata/core/rpc/netty/http/HttpDispatchHandler.java:
##########
@@ -82,13 +56,13 @@ protected void channelRead0(ChannelHandlerContext ctx, 
HttpRequest httpRequest)
             HttpInvocation httpInvocation = 
ControllerManager.getHttpInvocation(path);
 
             if (httpInvocation == null) {
-                sendErrorResponse(ctx, HttpResponseStatus.NOT_FOUND, 
keepAlive);
+                sendErrorResponse(ctx, HttpResponseStatus.NOT_FOUND, false);
                 return;
             }
 
-            HttpContext httpContext = new HttpContext(httpRequest, ctx, 
keepAlive);
+            HttpContext<HttpRequest> httpContext = new 
HttpContext<>(httpRequest, ctx, keepAlive,HttpContext.HTTP_1_1);
             ObjectNode requestDataNode = OBJECT_MAPPER.createObjectNode();
-            requestDataNode.putIfAbsent("param", 
ParameterParser.convertParamMap(queryStringDecoder.parameters()));
+            requestDataNode.put("param", 
ParameterParser.convertParamMap(queryStringDecoder.parameters()));

Review Comment:
   > The origin method in here is putIfAbsent
   
   There is no need to use the putIfAbsent method, so I will use the set method 
instead.



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