Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-59

Charset misusage in RocketMQSerializable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.0-incubating
    • Fix Version/s: 4.0.0-incubating
    • Component/s: rocketmq-remoting
    • Labels:
      None

      Description

      When writing unit tests for rocketmq-remoting, I found that RocketMQSerializable misused the charset for RemotingSerializable.

      Go into details. The class RemotingCommand has two formats to serialize its header: JSON format (source code RemotingSerializable.java) and ROCKETMQ (source code RocketMQSerializable.java) format, respectively. Both formats have their own encode method, decode method and charset. But methods in RocketMQSerializable.java use the charset for RemotingSerializable.java.

      Although two charsets are both UTF-8 thus no problem occurs so far, but it's better to modify to make the code commonsensible

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vongosling vongosling
                Reporter:
                kailai Kailai Shao
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: