You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/06/15 02:19:53 UTC

[GitHub] [rocketmq] IntroDrop opened a new pull request #2999: Develop

IntroDrop opened a new pull request #2999:
URL: https://github.com/apache/rocketmq/pull/2999


   ## What is the purpose of the change
   
   Optimize and simplify the code
   
   ## Brief changelog
   
   1. Use java built-in functions to simplify the code
   
   2. Fixed wrong words in comments


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

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



[GitHub] [rocketmq] coveralls commented on pull request #2999: [ISSUE #3000] Optimize the code and fix a comment

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #2999:
URL: https://github.com/apache/rocketmq/pull/2999#issuecomment-861125695


   
   [![Coverage Status](https://coveralls.io/builds/40581035/badge)](https://coveralls.io/builds/40581035)
   
   Coverage decreased (-0.3%) to 53.82% when pulling **2aa0672651173f06da984caf4a7cf3444b41545a on IntroDrop:develop** into **df1d93fc8859377b92ba87c6947911281656f355 on apache:develop**.
   


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

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



[GitHub] [rocketmq] caigy commented on a change in pull request #2999: [ISSUE #3000] Optimize the code and fix a comment

Posted by GitBox <gi...@apache.org>.
caigy commented on a change in pull request #2999:
URL: https://github.com/apache/rocketmq/pull/2999#discussion_r664337665



##########
File path: client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
##########
@@ -750,7 +745,7 @@ private SendResult sendKernelImpl(final Message msg,
                 }
 
                 final String tranMsg = msg.getProperty(MessageConst.PROPERTY_TRANSACTION_PREPARED);
-                if (tranMsg != null && Boolean.parseBoolean(tranMsg)) {
+                if (Boolean.parseBoolean(tranMsg)) {

Review comment:
       `tranMsg != null` can be viewed as double check here although `Boolean.parseBoolean` will check it, so it seems that removing this null check won't gain much profit.




-- 
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@rocketmq.apache.org

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



[GitHub] [rocketmq] caigy commented on a change in pull request #2999: [ISSUE #3000] Optimize the code and fix a comment

Posted by GitBox <gi...@apache.org>.
caigy commented on a change in pull request #2999:
URL: https://github.com/apache/rocketmq/pull/2999#discussion_r664337665



##########
File path: client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
##########
@@ -750,7 +745,7 @@ private SendResult sendKernelImpl(final Message msg,
                 }
 
                 final String tranMsg = msg.getProperty(MessageConst.PROPERTY_TRANSACTION_PREPARED);
-                if (tranMsg != null && Boolean.parseBoolean(tranMsg)) {
+                if (Boolean.parseBoolean(tranMsg)) {

Review comment:
       `tranMsg != null` can be viewed as double check here although `Boolean.parseBoolean` will check it, so it seems that removing this null check won't gain much profit.




-- 
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@rocketmq.apache.org

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