From 4b66cfd38928e8536477319e35a55bff45b74649 Mon Sep 17 00:00:00 2001 From: Lukas Brand Date: Mon, 28 Aug 2023 12:23:40 +0200 Subject: [PATCH 1/2] Bump version --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 824b06194..2774e25bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -version=1.3.1 -prevVersion=1.3.0 +version=1.3.2 +prevVersion=1.3.1 # # main dependencies # From 44c194144c574184f2ceb6821b05bb75cf9db3a7 Mon Sep 17 00:00:00 2001 From: Lukas Brand Date: Mon, 28 Aug 2023 13:03:56 +0200 Subject: [PATCH 2/2] Put reasonCode on first place of toString --- .../com/hivemq/client/internal/mqtt/message/auth/MqttAuth.java | 2 +- .../internal/mqtt/message/publish/puback/MqttPubAck.java | 3 ++- .../internal/mqtt/message/publish/pubcomp/MqttPubComp.java | 3 ++- .../internal/mqtt/message/publish/pubrec/MqttPubRec.java | 3 ++- .../internal/mqtt/message/publish/pubrel/MqttPubRel.java | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/hivemq/client/internal/mqtt/message/auth/MqttAuth.java b/src/main/java/com/hivemq/client/internal/mqtt/message/auth/MqttAuth.java index 7d7a44cad..b56696313 100644 --- a/src/main/java/com/hivemq/client/internal/mqtt/message/auth/MqttAuth.java +++ b/src/main/java/com/hivemq/client/internal/mqtt/message/auth/MqttAuth.java @@ -69,7 +69,7 @@ public MqttAuth( @Override protected @NotNull String toAttributeString() { - return "reasonCode= " + getReasonCode() + ", method=" + method + + return "reasonCode=" + getReasonCode() + ", method=" + method + ((data == null) ? "" : ", data=" + data.remaining() + "byte") + StringUtil.prepend(", ", super.toAttributeString()); } diff --git a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/puback/MqttPubAck.java b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/puback/MqttPubAck.java index 3c1e04c03..23396a861 100644 --- a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/puback/MqttPubAck.java +++ b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/puback/MqttPubAck.java @@ -20,6 +20,7 @@ import com.hivemq.client.internal.mqtt.datatypes.MqttUserPropertiesImpl; import com.hivemq.client.internal.mqtt.datatypes.MqttUtf8StringImpl; import com.hivemq.client.internal.mqtt.message.MqttMessageWithUserProperties; +import com.hivemq.client.internal.util.StringUtil; import com.hivemq.client.mqtt.mqtt5.message.publish.puback.Mqtt5PubAck; import com.hivemq.client.mqtt.mqtt5.message.publish.puback.Mqtt5PubAckReasonCode; import org.jetbrains.annotations.NotNull; @@ -45,7 +46,7 @@ public MqttPubAck( @Override public @NotNull String toString() { - return "MqttPubAck{" + toAttributeString() + "}"; + return "MqttPubAck{reasonCode=" + getReasonCode() + StringUtil.prepend(", ", super.toAttributeString()) + "}"; } @Override diff --git a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubcomp/MqttPubComp.java b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubcomp/MqttPubComp.java index 6caae0dd5..81c4aa7e7 100644 --- a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubcomp/MqttPubComp.java +++ b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubcomp/MqttPubComp.java @@ -20,6 +20,7 @@ import com.hivemq.client.internal.mqtt.datatypes.MqttUserPropertiesImpl; import com.hivemq.client.internal.mqtt.datatypes.MqttUtf8StringImpl; import com.hivemq.client.internal.mqtt.message.MqttMessageWithUserProperties; +import com.hivemq.client.internal.util.StringUtil; import com.hivemq.client.mqtt.mqtt5.message.publish.pubcomp.Mqtt5PubComp; import com.hivemq.client.mqtt.mqtt5.message.publish.pubcomp.Mqtt5PubCompReasonCode; import org.jetbrains.annotations.NotNull; @@ -45,7 +46,7 @@ public MqttPubComp( @Override public @NotNull String toString() { - return "MqttPubComp{" + toAttributeString() + "}"; + return "MqttPubComp{reasonCode=" + getReasonCode() + StringUtil.prepend(", ", super.toAttributeString()) + "}"; } @Override diff --git a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrec/MqttPubRec.java b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrec/MqttPubRec.java index 5bf73fa3f..59a50732f 100644 --- a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrec/MqttPubRec.java +++ b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrec/MqttPubRec.java @@ -20,6 +20,7 @@ import com.hivemq.client.internal.mqtt.datatypes.MqttUserPropertiesImpl; import com.hivemq.client.internal.mqtt.datatypes.MqttUtf8StringImpl; import com.hivemq.client.internal.mqtt.message.MqttMessageWithUserProperties; +import com.hivemq.client.internal.util.StringUtil; import com.hivemq.client.mqtt.mqtt5.message.publish.pubrec.Mqtt5PubRec; import com.hivemq.client.mqtt.mqtt5.message.publish.pubrec.Mqtt5PubRecReasonCode; import org.jetbrains.annotations.NotNull; @@ -45,7 +46,7 @@ public MqttPubRec( @Override public @NotNull String toString() { - return "MqttPubRec{" + toAttributeString() + "}"; + return "MqttPubRec{reasonCode=" + getReasonCode() + StringUtil.prepend(", ", super.toAttributeString()) + "}"; } @Override diff --git a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrel/MqttPubRel.java b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrel/MqttPubRel.java index ba10053b4..296561e25 100644 --- a/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrel/MqttPubRel.java +++ b/src/main/java/com/hivemq/client/internal/mqtt/message/publish/pubrel/MqttPubRel.java @@ -20,6 +20,7 @@ import com.hivemq.client.internal.mqtt.datatypes.MqttUserPropertiesImpl; import com.hivemq.client.internal.mqtt.datatypes.MqttUtf8StringImpl; import com.hivemq.client.internal.mqtt.message.MqttMessageWithUserProperties; +import com.hivemq.client.internal.util.StringUtil; import com.hivemq.client.mqtt.mqtt5.message.publish.pubrel.Mqtt5PubRel; import com.hivemq.client.mqtt.mqtt5.message.publish.pubrel.Mqtt5PubRelReasonCode; import org.jetbrains.annotations.NotNull; @@ -45,7 +46,7 @@ public MqttPubRel( @Override public @NotNull String toString() { - return "MqttPubRel{" + toAttributeString() + "}"; + return "MqttPubRel{reasonCode=" + getReasonCode() + StringUtil.prepend(", ", super.toAttributeString()) + "}"; } @Override