提交 fbccedbe 编写于 作者: 如梦技术's avatar 如梦技术 🐛

代码优化。

上级 629f9c31
...@@ -340,7 +340,7 @@ public final class MqttMessageBuilders { ...@@ -340,7 +340,7 @@ public final class MqttMessageBuilders {
private Long maximumPacketSize; private Long maximumPacketSize;
private int topicAliasMaximum; private int topicAliasMaximum;
private String reasonString; private String reasonString;
private MqttProperties.UserProperties userProperties = new MqttProperties.UserProperties(); private final MqttProperties.UserProperties userProperties = new MqttProperties.UserProperties();
private Boolean wildcardSubscriptionAvailable; private Boolean wildcardSubscriptionAvailable;
private Boolean subscriptionIdentifiersAvailable; private Boolean subscriptionIdentifiersAvailable;
private Boolean sharedSubscriptionAvailable; private Boolean sharedSubscriptionAvailable;
......
...@@ -65,11 +65,11 @@ public enum MqttVersion { ...@@ -65,11 +65,11 @@ public enum MqttVersion {
mv = MQTT_5; mv = MQTT_5;
break; break;
default: default:
throw new MqttUnacceptableProtocolVersionException(protocolName + "is unknown protocol name"); throw new MqttUnacceptableProtocolVersionException(protocolName + " is an unknown protocol name");
} }
if (mv.name.equals(protocolName)) { if (mv.name.equals(protocolName)) {
return mv; return mv;
} }
throw new MqttUnacceptableProtocolVersionException(protocolName + " and " + protocolLevel + " are not match"); throw new MqttUnacceptableProtocolVersionException(protocolName + " and " + protocolLevel + " don't match");
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册