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
will crash with a NoSuchElementException at run time if the response topic is ever an empty Optional. This appears to be a possibility, as getResponseTopic() returns an Optional.ofNullable of a nullable field responseTopic:
private final @Nullable MqttTopicImpl responseTopic;
public @NotNull Optional<MqttTopic> getResponseTopic() {
return Optional.ofNullable(responseTopic);
}
I am happy to write a patch for this, if desired - thanks!
I was looking at some code in RequestResponse.java
and noticed a call to
get()
here:will crash with a
NoSuchElementException
at run time if the response topic is ever an emptyOptional
. This appears to be a possibility, asgetResponseTopic()
returns anOptional.ofNullable
of a nullable fieldresponseTopic
:I am happy to write a patch for this, if desired - thanks!