Skip to content

Commit

Permalink
fix IllegalStateException when access ProtoBuf optional field (apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
aloyszhang authored Feb 5, 2021
1 parent cec7d4d commit c6ab123
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ protected void handleConnect(CommandConnect connect) {
remoteAddress,
service.isAuthenticationEnabled(),
connect.hasOriginalPrincipal(),
connect.getOriginalPrincipal());
connect.hasOriginalPrincipal() ? connect.getOriginalPrincipal() : null);
}

String clientVersion = connect.getClientVersion();
Expand Down Expand Up @@ -1326,8 +1326,9 @@ private void printSendCommandDebug(CommandSend send, ByteBuf headersAndPayload)
log.debug("[{}] Received send message request. producer: {}:{} {}:{} size: {},"
+ " partition key is: {}, ordering key is {}",
remoteAddress, send.getProducerId(), send.getSequenceId(), msgMetadata.getProducerName(),
msgMetadata.getSequenceId(), headersAndPayload.readableBytes(), msgMetadata.getPartitionKey(),
msgMetadata.getOrderingKey());
msgMetadata.getSequenceId(), headersAndPayload.readableBytes(),
msgMetadata.hasPartitionKey() ? msgMetadata.getPartitionKey() : null,
msgMetadata.hasOrderingKey() ? msgMetadata.getOrderingKey() : null);
}
}

Expand Down

0 comments on commit c6ab123

Please sign in to comment.