Skip to content

Commit 4d47d5f

Browse files
committed
feat(mqtt): add getVersion method to MqttConnectMessage
- Added getVersion() method to MqttConnectMessage class - Removed getVersion() method from MqttMessage base class - Improved MQTT version access consistency in message handling
1 parent 9a232e3 commit 4d47d5f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

smart-mqtt-common/src/main/java/tech/smartboot/mqtt/common/message/MqttConnectMessage.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,8 @@ public void decodePlayLoad(ByteBuffer buffer) {
121121
public MqttConnectPayload getPayload() {
122122
return mqttConnectPayload;
123123
}
124+
125+
public MqttVersion getVersion() {
126+
return version;
127+
}
124128
}

smart-mqtt-common/src/main/java/tech/smartboot/mqtt/common/message/MqttMessage.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ public void setRemainingLength(int remainingLength) {
111111
this.remainingLength = remainingLength;
112112
}
113113

114-
public final MqttVersion getVersion() {
115-
return version;
116-
}
117-
118114
public final void setVersion(MqttVersion version) {
119115
this.version = version;
120116
}

0 commit comments

Comments
 (0)