dingshuangxi888 commented on code in PR #7367:
URL: https://github.com/apache/rocketmq/pull/7367#discussion_r1335596568
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:
##########
@@ -202,29 +202,33 @@ private static int calTotalLen(int remark, int ext) {
return length;
}
- public static RemotingCommand rocketMQProtocolDecode(final ByteBuf
headerBuffer,
+ public static RemotingCommand rocketMQProtocolDecode(final ByteBuf
byteBuffer,
int headerLen) throws RemotingCommandException {
RemotingCommand cmd = new RemotingCommand();
+ int beginIndex = byteBuffer.readerIndex();
Review Comment:
变量建议在使用的时候再声明
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RocketMQSerializable.java:
##########
@@ -202,29 +202,33 @@ private static int calTotalLen(int remark, int ext) {
return length;
}
- public static RemotingCommand rocketMQProtocolDecode(final ByteBuf
headerBuffer,
+ public static RemotingCommand rocketMQProtocolDecode(final ByteBuf
byteBuffer,
int headerLen) throws RemotingCommandException {
RemotingCommand cmd = new RemotingCommand();
+ int beginIndex = byteBuffer.readerIndex();
Review Comment:
变量建议在使用的时候再声明
--
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]