diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java index 71cf4a3ead..25ef51ea9d 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java @@ -289,7 +289,7 @@ public class ProtonHandler extends ProtonInitializable { serverSasl.recv(dataSASL, 0, dataSASL.length); if (log.isTraceEnabled()) { - log.trace("Working on sasl::" + ByteUtil.bytesToHex(dataSASL, 2)); + log.trace("Working on sasl::" + (dataSASL != null && dataSASL.length > 0 ? ByteUtil.bytesToHex(dataSASL, 2) : "Anonymous")); } saslResult = mechanism.processSASL(dataSASL);