[viessmann] Fix SAT-warning for initJob disposed (#19977)

* [viessmann] Set disposed=false in the initialize() method

Signed-off-by: Ronny Grun <ronny.grun@t-online.de>
This commit is contained in:
Ronny Grun
2026-01-05 23:56:35 +01:00
committed by GitHub
parent 544b96bf03
commit 818d8f1ae9
3 changed files with 13 additions and 7 deletions
@@ -171,8 +171,9 @@ public class ViessmannAccountHandler extends BaseBridgeHandler implements ApiInt
public void dispose() {
disposed = true;
if (initJob != null) {
initJob.cancel(true);
ScheduledFuture<?> currentInitJob = initJob;
if (currentInitJob != null) {
currentInitJob.cancel(true);
initJob = null;
}
@@ -199,7 +200,7 @@ public class ViessmannAccountHandler extends BaseBridgeHandler implements ApiInt
} else {
apiCalls = 0;
}
disposed = false;
migrateChannelIds();
api = new ViessmannApi(this.config.apiKey, httpClient, this.config.user, this.config.password,
@@ -168,8 +168,9 @@ public class ViessmannBridgeHandler extends BaseBridgeHandler implements BridgeI
public void dispose() {
disposed = true;
if (initJob != null) {
initJob.cancel(true);
ScheduledFuture<?> currentInitJob = initJob;
if (currentInitJob != null) {
currentInitJob.cancel(true);
initJob = null;
}
@@ -197,6 +198,7 @@ public class ViessmannBridgeHandler extends BaseBridgeHandler implements BridgeI
} else {
apiCalls = 0;
}
disposed = false;
newInstallationId = "";
newGatewaySerial = "";
@@ -136,8 +136,9 @@ public class ViessmannGatewayHandler extends BaseBridgeHandler implements Bridge
public void dispose() {
disposed = true;
if (initJob != null) {
initJob.cancel(true);
ScheduledFuture<?> currentInitJob = initJob;
if (currentInitJob != null) {
currentInitJob.cancel(true);
initJob = null;
}
@@ -165,6 +166,8 @@ public class ViessmannGatewayHandler extends BaseBridgeHandler implements Bridge
this.gatewaySerial = config.gatewaySerial;
this.installationId = config.installationId;
disposed = false;
migrateChannelIds();
if (!config.disablePolling && errorChannelsLinked()) {