You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "fqgsoftwareengineer (via GitHub)" <gi...@apache.org> on 2023/09/27 14:38:20 UTC

[GitHub] [rocketmq] fqgsoftwareengineer opened a new pull request, #7408: Update ConsumeMessageOrderlyService.java

fqgsoftwareengineer opened a new pull request, #7408:
URL: https://github.com/apache/rocketmq/pull/7408

   Optimized performance
   
   <!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
   
   Optimized performance:
   The equals of enumeration types can be replaced by ==, which improves performance and is safer at compile and run time.
   see:
   1. https://docs.oracle.com/javase/specs/jls/se9/html/jls-8.html#jls-8.9
   2. https://stackoverflow.com/questions/1750435/comparing-java-enum-members-or-equals
   ### Brief Description
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   ### How Did You Test This Change?
   Just compare the pressure measurements with the previous ones
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
   


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

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


Re: [PR] Optimize ConsumeMessageOrderlyService enumerated types of comparison [rocketmq]

Posted by "fqgsoftwareengineer (via GitHub)" <gi...@apache.org>.
fqgsoftwareengineer closed pull request #7408: Optimize ConsumeMessageOrderlyService enumerated types of comparison
URL: https://github.com/apache/rocketmq/pull/7408


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

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


Re: [PR] Optimize ConsumeMessageOrderlyService enumerated types of comparison [rocketmq]

Posted by "fqgsoftwareengineer (via GitHub)" <gi...@apache.org>.
fqgsoftwareengineer closed pull request #7408: Optimize ConsumeMessageOrderlyService enumerated types of comparison
URL: https://github.com/apache/rocketmq/pull/7408


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

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


Re: [PR] Optimize ConsumeMessageOrderlyService enumerated types of comparison [rocketmq]

Posted by "fqgsoftwareengineer (via GitHub)" <gi...@apache.org>.
fqgsoftwareengineer closed pull request #7408: Optimize ConsumeMessageOrderlyService enumerated types of comparison
URL: https://github.com/apache/rocketmq/pull/7408


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

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


Re: [PR] Optimize ConsumeMessageOrderlyService enumerated types of comparison [rocketmq]

Posted by "joeCarf (via GitHub)" <gi...@apache.org>.
joeCarf commented on code in PR #7408:
URL: https://github.com/apache/rocketmq/pull/7408#discussion_r1349859665


##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:
##########
@@ -86,7 +86,7 @@ public ConsumeMessageOrderlyService(DefaultMQPushConsumerImpl defaultMQPushConsu
     }
 
     public void start() {
-        if (MessageModel.CLUSTERING.equals(ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.messageModel())) {
+        if (MessageModel.CLUSTERING==ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.messageModel()) {

Review Comment:
   need blank space around the equal operator



##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:
##########
@@ -86,7 +86,7 @@ public ConsumeMessageOrderlyService(DefaultMQPushConsumerImpl defaultMQPushConsu
     }
 
     public void start() {
-        if (MessageModel.CLUSTERING.equals(ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.messageModel())) {
+        if (MessageModel.CLUSTERING==ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.messageModel()) {

Review Comment:
   for good code style



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

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


Re: [PR] Optimize ConsumeMessageOrderlyService enumerated types of comparison [rocketmq]

Posted by "fqgsoftwareengineer (via GitHub)" <gi...@apache.org>.
fqgsoftwareengineer commented on code in PR #7408:
URL: https://github.com/apache/rocketmq/pull/7408#discussion_r1361788081


##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java:
##########
@@ -86,7 +86,7 @@ public ConsumeMessageOrderlyService(DefaultMQPushConsumerImpl defaultMQPushConsu
     }
 
     public void start() {
-        if (MessageModel.CLUSTERING.equals(ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.messageModel())) {
+        if (MessageModel.CLUSTERING==ConsumeMessageOrderlyService.this.defaultMQPushConsumerImpl.messageModel()) {

Review Comment:
   Space formatting has been added



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

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