Add default block in MqttVersion (#11226)
Motivation: Fix switch case fall through, add default block in MqttVersion Modification: Fix switch case fall through, add default block in MqttVersion Result: Code cleanup Signed-off-by: xingrufei <xingrufei@sogou-inc.com> Co-authored-by: xingrufei <xingrufei@sogou-inc.com>
This commit is contained in:
parent
574e079381
commit
84356bbeb0
@ -59,6 +59,8 @@ public enum MqttVersion {
|
|||||||
case 5:
|
case 5:
|
||||||
mv = MQTT_5;
|
mv = MQTT_5;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (mv == null) {
|
if (mv == null) {
|
||||||
throw new MqttUnacceptableProtocolVersionException(protocolName + "is unknown protocol name");
|
throw new MqttUnacceptableProtocolVersionException(protocolName + "is unknown protocol name");
|
||||||
|
Loading…
Reference in New Issue
Block a user