gongchangwangpi opened a new issue #2652:
URL: https://github.com/apache/rocketmq/issues/2652


   the method name is `getAndIncrement`, but the method implementation is 
increment and get
   
   ```
   public int getAndIncrement() {
           Integer index = this.threadLocalIndex.get();
           if (null == index) {
               index = Math.abs(random.nextInt());
               this.threadLocalIndex.set(index);
           }
           // **increment the index**
           index = Math.abs(index + 1);
           this.threadLocalIndex.set(index);
           // **return index after increment**
           return index;
   }
   ```
   so, the method name shuld be `incrementAndGet` or update the method 
implementation


----------------------------------------------------------------
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:
[email protected]


Reply via email to