lizhanhui commented on a change in pull request #3386:
URL: https://github.com/apache/rocketmq/pull/3386#discussion_r720614648
##########
File path:
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingSerializable.java
##########
@@ -17,11 +17,17 @@
package org.apache.rocketmq.remoting.protocol;
import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+
import java.nio.charset.Charset;
public abstract class RemotingSerializable {
private final static Charset CHARSET_UTF8 = Charset.forName("UTF-8");
+ static {
Review comment:
I agree it can be safely regarded as **A BUG** for not generating
standard-conforming **JSON**. But it would be necessary not to modify global
behavior without notice. Consider this scenario, an application developer uses
RocketMQ client and FastJSON at the same time. If our client quietly changes
the default behavior, we may break his/her application or mess his data up
totally in case he/she depends on the default behavior.
Further, IMO, RocketMQ-scope changes can be achieved through modifying
RemotingSerializable.java#decode/encode only.
--
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]