diff --git a/src/main/java/com/hivemq/mqtt/client2/internal/MqttRxClientBuilder.java b/src/main/java/com/hivemq/mqtt/client2/internal/MqttRxClientBuilder.java index cd616dca2..0f9484c33 100644 --- a/src/main/java/com/hivemq/mqtt/client2/internal/MqttRxClientBuilder.java +++ b/src/main/java/com/hivemq/mqtt/client2/internal/MqttRxClientBuilder.java @@ -90,7 +90,7 @@ public MqttRxClientBuilder() {} } @Override - public @NotNull MqttRxClientBuilder advancedConfig(final @NotNull Mqtt5AdvancedConfig advancedConfig) { + public @NotNull MqttRxClientBuilder advancedConfig(final @Nullable Mqtt5AdvancedConfig advancedConfig) { this.advancedConfig = Checks.notImplemented(advancedConfig, MqttAdvancedConfig.class, "Advanced config"); return this; } diff --git a/src/main/java/com/hivemq/mqtt/client2/internal/message/connect/MqttConnectRestrictionsBuilder.java b/src/main/java/com/hivemq/mqtt/client2/internal/message/connect/MqttConnectRestrictionsBuilder.java index 61a38b418..92e535204 100644 --- a/src/main/java/com/hivemq/mqtt/client2/internal/message/connect/MqttConnectRestrictionsBuilder.java +++ b/src/main/java/com/hivemq/mqtt/client2/internal/message/connect/MqttConnectRestrictionsBuilder.java @@ -125,6 +125,8 @@ public Default() {} public static class Nested
extends MqttConnectRestrictionsBuilder , Mqtt3ConnectRestrictionsBuilder.Nested {
+ private final @NotNull Function super MqttConnectRestrictions, P> parentConsumer;
+
public Nested(
final @NotNull MqttConnectRestrictions restrictions,
final @NotNull Function super MqttConnectRestrictions, P> parentConsumer) {
@@ -133,8 +135,6 @@ public Nested(
this.parentConsumer = parentConsumer;
}
- private final @NotNull Function super MqttConnectRestrictions, P> parentConsumer;
-
@Override
@NotNull Nested self() {
return this;
diff --git a/src/main/java/com/hivemq/mqtt/client2/internal/mqtt3/Mqtt3RxClientViewBuilder.java b/src/main/java/com/hivemq/mqtt/client2/internal/mqtt3/Mqtt3RxClientViewBuilder.java
index 3b1062ac8..55145b285 100644
--- a/src/main/java/com/hivemq/mqtt/client2/internal/mqtt3/Mqtt3RxClientViewBuilder.java
+++ b/src/main/java/com/hivemq/mqtt/client2/internal/mqtt3/Mqtt3RxClientViewBuilder.java
@@ -77,6 +77,11 @@ public Mqtt3RxClientViewBuilder(
}
}
+ @Override
+ protected @NotNull Mqtt3RxClientViewBuilder self() {
+ return this;
+ }
+
private @NotNull MqttConnectedListener