You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/11 03:54:52 UTC

[GitHub] [incubator-eventmesh] weihubeats opened a new pull request, #2553: [Enhancement] Method invocation 'getBytes' may produce 'NullPointerException' [HttpCommand]

weihubeats opened a new pull request, #2553:
URL: https://github.com/apache/incubator-eventmesh/pull/2553

   Fixes https://github.com/apache/incubator-eventmesh/issues/2539
   
   ### Motivation
   
   *Explain the content here.*
   *Explain why you want to make the changes and what problem you're trying to solve.*
   
   
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on a diff in pull request #2553: [Enhancement] Method invocation 'getBytes' may produce 'NullPointerException' [HttpCommand]

Posted by GitBox <gi...@apache.org>.
walterlife commented on code in PR #2553:
URL: https://github.com/apache/incubator-eventmesh/pull/2553#discussion_r1045212631


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java:
##########
@@ -110,132 +114,62 @@ public HttpCommand createHttpCommandResponse(EventMeshRetCode eventMeshRetCode)
         return response;
     }
 
-    public long getReqTime() {
-        return reqTime;
-    }
-
-    public void setReqTime(long reqTime) {
-        this.reqTime = reqTime;
-    }
-
-    public long getResTime() {
-        return resTime;
-    }
-
-    public void setResTime(long resTime) {
-        this.resTime = resTime;
-    }
-
-    public long getOpaque() {
-        return opaque;
-    }
-
-    public void setOpaque(long opaque) {
-        this.opaque = opaque;
-    }
-
-    public CmdType getCmdType() {
-        return cmdType;
-    }
-
-    public void setCmdType(CmdType cmdType) {
-        this.cmdType = cmdType;
-    }
-
-    public String getHttpMethod() {
-        return httpMethod;
-    }
-
-    public void setHttpMethod(String httpMethod) {
-        this.httpMethod = httpMethod;
-    }
-
-    public String getHttpVersion() {
-        return httpVersion;
-    }
-
-    public void setHttpVersion(String httpVersion) {
-        this.httpVersion = httpVersion;
-    }
-
-    public String getRequestCode() {
-        return requestCode;
-    }
-
-    public void setRequestCode(String requestCode) {
-        this.requestCode = requestCode;
-    }
-
-    public Header getHeader() {
-        return header;
-    }
-
-    public void setHeader(Header header) {
-        this.header = header;
-    }
-
-    public Body getBody() {
-        return body;
-    }
-
-    public void setBody(Body body) {
-        this.body = body;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("body=").append(body)
-                .append("}");
+            .append("body=").append(body)
+            .append("}");
 
         return sb.toString();
     }
 
     public String abstractDesc() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("bodySize=").append(body.toString().length()).append("}");
+            .append("bodySize=").append(body.toString().length()).append("}");
 
         return sb.toString();
     }
 
     public String simpleDesc() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append("}");
-
-        return sb.toString();
+        return "httpCommand={"
+            + cmdType
+            + ","
+            + httpMethod
+            + "/" + httpVersion
+            + ","
+            + "requestCode="
+            + requestCode
+            + "}";

Review Comment:
   With no performance or code style concerns, the author should maintain consistency with the existing code.
   For more details, please read the google code review guide.
   https://google.github.io/eng-practices/review/reviewer/looking-for.html#consistency
   



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov[bot] commented on pull request #2553: [Enhancement] Method invocation 'getBytes' may produce 'NullPointerException' [HttpCommand]

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2553:
URL: https://github.com/apache/incubator-eventmesh/pull/2553#issuecomment-1345523492

   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2553](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5409056) into [master](https://codecov.io/gh/apache/incubator-eventmesh/commit/7f7e2f04f73f3ad9e10cec88e31c51d4638d7cd4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7f7e2f0) will **decrease** coverage by `0.08%`.
   > The diff coverage is `50.00%`.
   
   > :exclamation: Current head 5409056 differs from pull request most recent head c52116c. Consider uploading reports for the commit c52116c to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2553      +/-   ##
   ============================================
   - Coverage     11.66%   11.57%   -0.09%     
   + Complexity      904      893      -11     
   ============================================
     Files           469      469              
     Lines         27901    27864      -37     
     Branches       3026     3024       -2     
   ============================================
   - Hits           3254     3226      -28     
   + Misses        24356    24348       -8     
   + Partials        291      290       -1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...he/eventmesh/common/protocol/http/HttpCommand.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9wcm90b2NvbC9odHRwL0h0dHBDb21tYW5kLmphdmE=) | `56.09% <50.00%> (-3.91%)` | :arrow_down: |
   | [...tandalone/broker/task/HistoryMessageClearTask.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvYnJva2VyL3Rhc2svSGlzdG9yeU1lc3NhZ2VDbGVhclRhc2suamF2YQ==) | `29.41% <0.00%> (-17.65%)` | :arrow_down: |
   | [...mesh/connector/standalone/broker/MessageQueue.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvYnJva2VyL01lc3NhZ2VRdWV1ZS5qYXZh) | `32.46% <0.00%> (-7.80%)` | :arrow_down: |
   | [.../admin/handler/QueryRecommendEventMeshHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUXVlcnlSZWNvbW1lbmRFdmVudE1lc2hIYW5kbGVyLmphdmE=) | `33.33% <0.00%> (-3.71%)` | :arrow_down: |
   | [.../trace/pinpoint/exporter/PinpointSpanExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXRyYWNlLXBsdWdpbi9ldmVudG1lc2gtdHJhY2UtcGlucG9pbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC90cmFjZS9waW5wb2ludC9leHBvcnRlci9QaW5wb2ludFNwYW5FeHBvcnRlci5qYXZh) | `68.24% <0.00%> (-0.68%)` | :arrow_down: |
   | [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...che/eventmesh/runtime/boot/EventMeshTCPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvRXZlbnRNZXNoVENQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...sh/client/http/producer/EventMeshHttpProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L2h0dHAvcHJvZHVjZXIvRXZlbnRNZXNoSHR0cFByb2R1Y2VyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...core/protocol/http/consumer/EventMeshConsumer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9jb25zdW1lci9FdmVudE1lc2hDb25zdW1lci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../protocol/tcp/client/group/ClientGroupWrapper.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvdGNwL2NsaWVudC9ncm91cC9DbGllbnRHcm91cFdyYXBwZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | ... and [4 more](https://codecov.io/gh/apache/incubator-eventmesh/pull/2553/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on a diff in pull request #2553: [Enhancement] Method invocation 'getBytes' may produce 'NullPointerException' [HttpCommand]

Posted by GitBox <gi...@apache.org>.
walterlife commented on code in PR #2553:
URL: https://github.com/apache/incubator-eventmesh/pull/2553#discussion_r1045209946


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java:
##########
@@ -110,132 +114,62 @@ public HttpCommand createHttpCommandResponse(EventMeshRetCode eventMeshRetCode)
         return response;
     }
 
-    public long getReqTime() {
-        return reqTime;
-    }
-
-    public void setReqTime(long reqTime) {
-        this.reqTime = reqTime;
-    }
-
-    public long getResTime() {
-        return resTime;
-    }
-
-    public void setResTime(long resTime) {
-        this.resTime = resTime;
-    }
-
-    public long getOpaque() {
-        return opaque;
-    }
-
-    public void setOpaque(long opaque) {
-        this.opaque = opaque;
-    }
-
-    public CmdType getCmdType() {
-        return cmdType;
-    }
-
-    public void setCmdType(CmdType cmdType) {
-        this.cmdType = cmdType;
-    }
-
-    public String getHttpMethod() {
-        return httpMethod;
-    }
-
-    public void setHttpMethod(String httpMethod) {
-        this.httpMethod = httpMethod;
-    }
-
-    public String getHttpVersion() {
-        return httpVersion;
-    }
-
-    public void setHttpVersion(String httpVersion) {
-        this.httpVersion = httpVersion;
-    }
-
-    public String getRequestCode() {
-        return requestCode;
-    }
-
-    public void setRequestCode(String requestCode) {
-        this.requestCode = requestCode;
-    }
-
-    public Header getHeader() {
-        return header;
-    }
-
-    public void setHeader(Header header) {
-        this.header = header;
-    }
-
-    public Body getBody() {
-        return body;
-    }
-
-    public void setBody(Body body) {
-        this.body = body;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("body=").append(body)
-                .append("}");
+            .append("body=").append(body)
+            .append("}");
 
         return sb.toString();
     }
 
     public String abstractDesc() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("bodySize=").append(body.toString().length()).append("}");
+            .append("bodySize=").append(body.toString().length()).append("}");
 
         return sb.toString();
     }
 
     public String simpleDesc() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append("}");
-
-        return sb.toString();
+        return "httpCommand={"
+            + cmdType
+            + ","
+            + httpMethod
+            + "/" + httpVersion
+            + ","
+            + "requestCode="
+            + requestCode
+            + "}";

Review Comment:
   It is recommended to use StringBuilder uniformly here to ensure the consistency of the internal code of the class as much as possible.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife merged pull request #2553: [Enhancement] Method invocation 'getBytes' may produce 'NullPointerException' [HttpCommand]

Posted by GitBox <gi...@apache.org>.
walterlife merged PR #2553:
URL: https://github.com/apache/incubator-eventmesh/pull/2553


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] weihubeats commented on a diff in pull request #2553: [Enhancement] Method invocation 'getBytes' may produce 'NullPointerException' [HttpCommand]

Posted by GitBox <gi...@apache.org>.
weihubeats commented on code in PR #2553:
URL: https://github.com/apache/incubator-eventmesh/pull/2553#discussion_r1045211262


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/http/HttpCommand.java:
##########
@@ -110,132 +114,62 @@ public HttpCommand createHttpCommandResponse(EventMeshRetCode eventMeshRetCode)
         return response;
     }
 
-    public long getReqTime() {
-        return reqTime;
-    }
-
-    public void setReqTime(long reqTime) {
-        this.reqTime = reqTime;
-    }
-
-    public long getResTime() {
-        return resTime;
-    }
-
-    public void setResTime(long resTime) {
-        this.resTime = resTime;
-    }
-
-    public long getOpaque() {
-        return opaque;
-    }
-
-    public void setOpaque(long opaque) {
-        this.opaque = opaque;
-    }
-
-    public CmdType getCmdType() {
-        return cmdType;
-    }
-
-    public void setCmdType(CmdType cmdType) {
-        this.cmdType = cmdType;
-    }
-
-    public String getHttpMethod() {
-        return httpMethod;
-    }
-
-    public void setHttpMethod(String httpMethod) {
-        this.httpMethod = httpMethod;
-    }
-
-    public String getHttpVersion() {
-        return httpVersion;
-    }
-
-    public void setHttpVersion(String httpVersion) {
-        this.httpVersion = httpVersion;
-    }
-
-    public String getRequestCode() {
-        return requestCode;
-    }
-
-    public void setRequestCode(String requestCode) {
-        this.requestCode = requestCode;
-    }
-
-    public Header getHeader() {
-        return header;
-    }
-
-    public void setHeader(Header header) {
-        this.header = header;
-    }
-
-    public Body getBody() {
-        return body;
-    }
-
-    public void setBody(Body body) {
-        this.body = body;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("body=").append(body)
-                .append("}");
+            .append("body=").append(body)
+            .append("}");
 
         return sb.toString();
     }
 
     public String abstractDesc() {
         StringBuilder sb = new StringBuilder();
         sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append(",")
-                .append("opaque=").append(opaque).append(",");
+            .append(cmdType).append(",")
+            .append(httpMethod).append("/").append(httpVersion).append(",")
+            .append("requestCode=").append(requestCode).append(",")
+            .append("opaque=").append(opaque).append(",");
 
         if (cmdType == CmdType.RES) {
             sb.append("cost=").append(resTime - reqTime).append(",");
         }
 
         sb.append("header=").append(header).append(",")
-                .append("bodySize=").append(body.toString().length()).append("}");
+            .append("bodySize=").append(body.toString().length()).append("}");
 
         return sb.toString();
     }
 
     public String simpleDesc() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("httpCommand={")
-                .append(cmdType).append(",")
-                .append(httpMethod).append("/").append(httpVersion).append(",")
-                .append("requestCode=").append(requestCode).append("}");
-
-        return sb.toString();
+        return "httpCommand={"
+            + cmdType
+            + ","
+            + httpMethod
+            + "/" + httpVersion
+            + ","
+            + "requestCode="
+            + requestCode
+            + "}";

Review Comment:
   Can also, with + just more brief, there is no performance gap between the two



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org