areyouok commented on pull request #3588:
URL: https://github.com/apache/rocketmq/pull/3588#issuecomment-1010569771


   > In request or response header, some `Integer` fields(queueId, sysFlag, 
etc) are assigned by `java.lang.Integer#parseInt(java.lang.String)`. Is it more 
appropriate to use `java.lang.Integer#valueOf(java.lang.String)` to prevent 
auto-boxing? `valueOf()` will use `IntegerCache`, but the behavior of 
auto-boxing depends on the implementation of compiler.
   
   The java 8 compiler use Integer.valueOf(Integer) for auto-boxing, frequently 
requested values is caching.
   
   By the way, the rocketmq header objects should use primitive types, but I do 
not change this time.
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to