Aaron-He commented on a change in pull request #3475:
URL: https://github.com/apache/rocketmq/pull/3475#discussion_r751981478



##########
File path: 
acl/src/test/java/org/apache/rocketmq/acl/plain/PlainAccessValidatorTest.java
##########
@@ -39,16 +27,21 @@
 import org.apache.rocketmq.common.protocol.heartbeat.HeartbeatData;
 import org.apache.rocketmq.common.protocol.heartbeat.ProducerData;
 import org.apache.rocketmq.common.protocol.heartbeat.SubscriptionData;
+import org.apache.rocketmq.remoting.exception.RemotingCommandException;
 import org.apache.rocketmq.remoting.protocol.RemotingCommand;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
+import java.nio.ByteBuffer;
+import java.util.*;

Review comment:
       > Same with last comment
   
   headerBuffer.capacity() - headerBuffer.position() is more precise than 
headerArray.length.
   Howerver, headerBuffer.capacity() - headerBuffer.position() has more 
subtraction operation than headerArray.length. Considering performance, 
headerArray.length may be more appropriate.




-- 
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