yuz10 commented on code in PR #10162:
URL: https://github.com/apache/rocketmq/pull/10162#discussion_r2924388050
##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingSerializable.java:
##########
@@ -30,8 +30,7 @@ public static byte[] encode(final Object obj) {
if (obj == null) {
return null;
}
- final String json = toJson(obj, false);
- return json.getBytes(CHARSET_UTF8);
+ return JSON.toJSONBytes(obj);
Review Comment:
suguest use `JSON.toJSONBytes(obj, StandardCharsets.UTF_8)`
--
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]