Skip to content

Commit 7452705

Browse files
committed
Formatting
1 parent f2e9bc9 commit 7452705

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

Diff for: src/main/java/com/hivemq/client/internal/mqtt/codec/decoder/mqtt5/Mqtt5PublishDecoder.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ public class Mqtt5PublishDecoder implements MqttMessageDecoder {
155155
throw new MqttDecoderException("malformed subscription identifier");
156156
}
157157
if (subscriptionIdentifier == 0) {
158-
throw new MqttDecoderException(
159-
Mqtt5DisconnectReasonCode.PROTOCOL_ERROR,
158+
throw new MqttDecoderException(Mqtt5DisconnectReasonCode.PROTOCOL_ERROR,
160159
"subscription identifier must not be 0");
161160
}
162161
subscriptionIdentifiersBuilder.add(subscriptionIdentifier);
@@ -174,8 +173,7 @@ public class Mqtt5PublishDecoder implements MqttMessageDecoder {
174173
if (topicAlias != DEFAULT_NO_TOPIC_ALIAS) {
175174
final MqttTopicImpl[] topicAliasMapping = context.getTopicAliasMapping();
176175
if ((topicAliasMapping == null) || (topicAlias > topicAliasMapping.length)) {
177-
throw new MqttDecoderException(
178-
Mqtt5DisconnectReasonCode.TOPIC_ALIAS_INVALID,
176+
throw new MqttDecoderException(Mqtt5DisconnectReasonCode.TOPIC_ALIAS_INVALID,
179177
"topic alias must not exceed topic alias maximum");
180178
}
181179
if (topic == null) {
@@ -189,8 +187,7 @@ public class Mqtt5PublishDecoder implements MqttMessageDecoder {
189187
topicAlias |= TOPIC_ALIAS_FLAG_NEW;
190188
}
191189
} else if (topic == null) {
192-
throw new MqttDecoderException(
193-
Mqtt5DisconnectReasonCode.PROTOCOL_ERROR,
190+
throw new MqttDecoderException(Mqtt5DisconnectReasonCode.PROTOCOL_ERROR,
194191
"topic alias must be present if topic name is zero length");
195192
}
196193

Diff for: src/main/java/com/hivemq/client/internal/mqtt/handler/auth/MqttReAuthHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ void readReAuth(final @NotNull ChannelHandlerContext ctx, final @NotNull MqttAut
158158
}
159159
if (state != MqttAuthState.NONE) {
160160
MqttDisconnectUtil.disconnect(ctx.channel(), Mqtt5DisconnectReasonCode.PROTOCOL_ERROR,
161-
new Mqtt5AuthException(
162-
auth,
161+
new Mqtt5AuthException(auth,
163162
"Must not receive AUTH with reason code REAUTHENTICATE if reauth is still pending."));
164163
return;
165164
}

Diff for: src/main/java/com/hivemq/client/internal/mqtt/handler/publish/outgoing/MqttOutgoingQosHandler.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ public void onSessionStartOrResume(
116116
super.onSessionStartOrResume(connectionConfig, eventLoop);
117117

118118
final int oldSendMaximum = sendMaximum;
119-
final int newSendMaximum = Math.min(
120-
connectionConfig.getSendMaximum(),
119+
final int newSendMaximum = Math.min(connectionConfig.getSendMaximum(),
121120
UnsignedDataTypes.UNSIGNED_SHORT_MAX_VALUE - MqttSubscriptionHandler.MAX_SUB_PENDING);
122121
sendMaximum = newSendMaximum;
123122
packetIdentifiers.resize(newSendMaximum);
@@ -260,8 +259,7 @@ private void writePublish(
260259
private void writeQos0Publish(
261260
final @NotNull ChannelHandlerContext ctx, final @NotNull MqttPublishWithFlow publishWithFlow) {
262261

263-
ctx.write(
264-
publishWithFlow.getPublish().createStateful(NO_PACKET_IDENTIFIER_QOS_0, false, topicAliasMapping),
262+
ctx.write(publishWithFlow.getPublish().createStateful(NO_PACKET_IDENTIFIER_QOS_0, false, topicAliasMapping),
265263
new DefaultContextPromise<>(ctx.channel(), publishWithFlow)).addListener(this);
266264
}
267265

@@ -291,8 +289,7 @@ private void writeQos1Or2Publish(
291289
pendingIndex.put(publishWithFlow);
292290
pending.add(publishWithFlow);
293291

294-
writeQos1Or2Publish(
295-
ctx,
292+
writeQos1Or2Publish(ctx,
296293
publishWithFlow.getPublish().createStateful(packetIdentifier, false, topicAliasMapping),
297294
publishWithFlow);
298295
}

Diff for: src/main/java/com/hivemq/client/mqtt/mqtt5/message/publish/Mqtt5PayloadFormatIndicator.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public enum Mqtt5PayloadFormatIndicator {
3232
*/
3333
UNSPECIFIED,
3434
/**
35-
* Payload consists of UTF-8 encoded character data as defined by the Unicode specification and restated in RFC 3629.
35+
* Payload consists of UTF-8 encoded character data as defined by the Unicode specification and restated in RFC
36+
* 3629.
3637
*/
3738
UTF_8;
3839

0 commit comments

Comments
 (0)