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

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   All platform.
   
   ### RocketMQ version
   
   branch: develop.
   
   ### JDK Version
   
   All compiler.
   
   ### Describe the Bug
   
   In the `ResponseCode` class, it assign same value to diffenert variables. 
I'm not sure assign the repeat value is a good idea in most cases.
   
   But if it used to some special scenarios, please tell me. Thanks.
   
   ```java
   public class ResponseCode extends RemotingSysResponseCode {
       ...
       // repeat with POLLING_FULL
       public static final int UPDATE_AND_CREATE_ACL_CONFIG_FAILED = 209;
       // repeat with POLLING_TIMEOUT
       public static final int DELETE_ACL_CONFIG_FAILED = 210;
       // repeat with BROKER_NOT_EXIST
       public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 211;
   
       public static final int POLLING_FULL = 209;
   
       public static final int POLLING_TIMEOUT = 210;
   
       public static final int BROKER_NOT_EXIST = 211;
       ...
   }
   ```
   
   ### Steps to Reproduce
   
   In `org.apache.rocketmq.remoting.protocol.ResponseCode` source file. Lines 
from `75-85`.
   
   ### What Did You Expect to See?
   
   Maybe should assign unique value to different variables.
   
   ### What Did You See Instead?
   
   Assigned some repeat value to different variables.
   
   ### 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