Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tgracchus committed Oct 9, 2023
1 parent d340908 commit 0a16655
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.hivemq.bootstrap.netty.ChannelDependencies;
import com.hivemq.configuration.service.MqttConfigurationService;
import com.hivemq.extension.sdk.api.annotations.NotNull;
import com.hivemq.extension.sdk.api.annotations.Nullable;
import com.hivemq.metrics.handler.GlobalMQTTMessageCounter;
import com.hivemq.mqtt.handler.connack.MqttConnacker;
import com.hivemq.mqtt.handler.disconnect.MqttServerDisconnector;
Expand Down Expand Up @@ -122,7 +123,7 @@ protected void decode(
final int packetSize = fixedHeaderSize + remainingLength;

final MessageType messageType = getMessageType(fixedHeader);
final Message message;
final @Nullable Message message;
if (messageType == CONNECT) {
message = handleConnect(buf, clientConnectionContext, fixedHeader, packetSize, remainingLength);
} else {
Expand Down Expand Up @@ -160,7 +161,7 @@ private Message handleConnect(

final ByteBuf messageBuffer = readRestOfMessage(buf, remainingLength);

final ProtocolVersion protocolVersion =
final @Nullable ProtocolVersion protocolVersion =
connectDecoder.decodeProtocolVersion(clientConnectionContext, messageBuffer);
if (protocolVersion == null) {
return null;
Expand Down

0 comments on commit 0a16655

Please sign in to comment.