HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
It appears the intention of MqttUtf8String.toString() is to return the decoded String (see also implementation). However, this is currently not documented; toString() is not overridden and its documentation is not adjusted. It is therefore not obvious how a user can easily get a String from a MqttUtf8String.
Preferred solution or suggestions
If MqttUtf8String.toString() is guaranteed to return the decoded String, then MqttUtf8String should override toString() and add a Javadoc comment to it describing its behavior.
Problem or use case
It appears the intention of
MqttUtf8String.toString()
is to return the decoded String (see also implementation). However, this is currently not documented;toString()
is not overridden and its documentation is not adjusted. It is therefore not obvious how a user can easily get a String from aMqttUtf8String
.Preferred solution or suggestions
If
MqttUtf8String.toString()
is guaranteed to return the decoded String, thenMqttUtf8String
should overridetoString()
and add a Javadoc comment to it describing its behavior.