wyyl1 opened a new issue, #7785:
URL: https://github.com/apache/rocketmq/issues/7785

   ### Before Creating the Enhancement Request
   
   - [X] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Summary
   
   Remove the redundant code because Math.abs does not return negative numbers
   
   ### Motivation
   
   Make the code clean
   
   ### Describe the Solution You'd Like
   
   ## Remove the redundant code
   
   ### source code
   
   ```java
   public void reset() {
       int index = Math.abs(random.nextInt(Integer.MAX_VALUE));
       if (index < 0) {
           index = 0;
       }
       this.threadLocalIndex.set(index);
   }
   ```
   
   ### redundant code
   
   ```java
   if (index < 0) {
       index = 0;
   }
   ```
   
   ### Describe Alternatives You've Considered
   
   none
   
   ### Additional Context
   
   _No response_


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

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

Reply via email to