Skip to content

Commit

Permalink
Removed one superfluous constructor.
Browse files Browse the repository at this point in the history
Signed-off-by: Juergen Fickel <juergen.fickel@bosch.io>
  • Loading branch information
Juergen Fickel committed Jul 12, 2022
1 parent fef2fbd commit 5654a8f
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,13 @@ public final class MqttClientActor extends BaseClientActor {
@Nullable private ActorRef publishingActorRef;
private final List<ActorRef> mqttConsumerActorRefs;

@SuppressWarnings("unused") // called by reflection
@SuppressWarnings("java:S1144") // called by reflection
private MqttClientActor(final Connection connection,
final ActorRef proxyActor,
final ActorRef connectionActor,
final DittoHeaders dittoHeaders,
final Config connectivityConfigOverwrites) {

this(connection, proxyActor, connectionActor, dittoHeaders, connectivityConfigOverwrites,
GenericMqttClientFactory.newInstance());
}

@SuppressWarnings("java:S1144")
private MqttClientActor(final Connection connection,
final ActorRef proxyActor,
final ActorRef connectionActor,
final DittoHeaders dittoHeaders,
final Config connectivityConfigOverwrites,
final GenericMqttClientFactory genericMqttClientFactory) {

super(connection, proxyActor, connectionActor, dittoHeaders, connectivityConfigOverwrites);

final var connectivityConfig = connectivityConfig();
Expand All @@ -108,7 +96,7 @@ private MqttClientActor(final Connection connection,

mqttSpecificConfig = MqttSpecificConfig.fromConnection(connection, mqttConfig);

this.genericMqttClientFactory = genericMqttClientFactory;
genericMqttClientFactory = GenericMqttClientFactory.newInstance();
genericMqttClient = null;
automaticReconnect = new AtomicBoolean(true);
publishingActorRef = null;
Expand Down

0 comments on commit 5654a8f

Please sign in to comment.