MqttConnectPayload.toString() should use Arrays.toString() instead of [].toString() (#9292)

Motivation:

The toString() method should use Arrays.toString() to produce a meaningful String representation for arrays.

Modification:

Use Arrays.toString()

Result:

More useful toString() implementation
This commit is contained in:
jimin 2019-06-28 03:55:02 +08:00 committed by Norman Maurer
parent a469c2eaac
commit 757e48c3e9

View File

@ -16,6 +16,8 @@
package io.netty.handler.codec.mqtt;
import java.util.Arrays;
import io.netty.util.CharsetUtil;
import io.netty.util.internal.StringUtil;
@ -103,9 +105,9 @@ public final class MqttConnectPayload {
.append('[')
.append("clientIdentifier=").append(clientIdentifier)
.append(", willTopic=").append(willTopic)
.append(", willMessage=").append(willMessage)
.append(", willMessage=").append(Arrays.toString(willMessage))
.append(", userName=").append(userName)
.append(", password=").append(password)
.append(", password=").append(Arrays.toString(password))
.append(']')
.toString();
}