mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[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:
+4
-3
@@ -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,
|
||||
|
||||
+4
-2
@@ -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 = "";
|
||||
|
||||
|
||||
+5
-2
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user