[Remoting] The specific IllegalArgumentException will not throw when user sets a wrong serialization method
Before Creating the Bug Report
-
[X] I found a bug, not just asking a question, which should be created in GitHub Discussions.
-
[X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
-
[X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Linux
RocketMQ version
The latest.
JDK Version
No response
Describe the Bug
org.apache.rocketmq.remoting.protocol.SerializeType.valueOf(byte code) can not throw the IllegalArgumentException .We can not locate the mistake when there are something wrong in SerializeType.
May I submit a PR to fix it?
Steps to Reproduce
When I want to set my own serialize method.
What Did You Expect to See?
Just throw the exception when can't get any code.
What Did You See Instead?
Throw a clear exception.
Additional Context
No response
Can you provide the SDK log? Here, you can see that when it reaches this point, the code is not either of these two.