joeCarf commented on code in PR #7455: URL: https://github.com/apache/rocketmq/pull/7455#discussion_r1357669323
########## remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java: ########## @@ -260,7 +261,11 @@ public void writeCustomHeader(CommandCustomHeader customHeader) { public CommandCustomHeader decodeCommandCustomHeader( Class<? extends CommandCustomHeader> classHeader) throws RemotingCommandException { - return decodeCommandCustomHeader(classHeader, true); + if (cachedHeader != null) { Review Comment: 对于两次不同的入参,这种写法会出现返回结果相同的情况。符合预期吗 ########## remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java: ########## @@ -260,7 +261,11 @@ public void writeCustomHeader(CommandCustomHeader customHeader) { public CommandCustomHeader decodeCommandCustomHeader( Class<? extends CommandCustomHeader> classHeader) throws RemotingCommandException { - return decodeCommandCustomHeader(classHeader, true); + if (cachedHeader != null) { 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org