funky-eyes commented on code in PR #6727:
URL: https://github.com/apache/incubator-seata/pull/6727#discussion_r1703468622
##########
serializer/seata-serializer-seata/src/main/java/org/apache/seata/serializer/seata/SeataSerializer.java:
##########
@@ -172,11 +172,8 @@ private static <T> T deserializeByVersion(byte[] bytes,
byte version) {
ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);
//typecode
short typecode = byteBuffer.getShort();
- //msg body
- byte[] body = new byte[byteBuffer.remaining()];
- byteBuffer.get(body);
- ByteBuffer in = ByteBuffer.wrap(body);
- //new Messgae
+ ByteBuffer in = byteBuffer.slice();
Review Comment:
Why such a change?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]