Fix SAT errors (#18047)

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
lsiepel 2025-01-06 21:56:13 +01:00 committed by GitHub
parent 8a442d9aff
commit 7639b1c3e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View File

@ -12,12 +12,15 @@
*/ */
package org.openhab.binding.digiplex.internal; package org.openhab.binding.digiplex.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
/** /**
* The {@link DigiplexAreaConfiguration} class contains fields mapping area configuration parameters. * The {@link DigiplexAreaConfiguration} class contains fields mapping area configuration parameters.
* *
* @author Robert Michalak - Initial contribution * @author Robert Michalak - Initial contribution
*/ */
@NonNullByDefault
public class DigiplexAreaConfiguration { public class DigiplexAreaConfiguration {
public int refreshPeriod; public int refreshPeriod = 60;
} }

View File

@ -12,13 +12,16 @@
*/ */
package org.openhab.binding.digiplex.internal; package org.openhab.binding.digiplex.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
/** /**
* The {@link DigiplexBridgeConfiguration} class contains fields mapping bridge configuration parameters. * The {@link DigiplexBridgeConfiguration} class contains fields mapping bridge configuration parameters.
* *
* @author Robert Michalak - Initial contribution * @author Robert Michalak - Initial contribution
*/ */
@NonNullByDefault
public class DigiplexBridgeConfiguration { public class DigiplexBridgeConfiguration {
public String port; public String port = "";
public int baudrate; public int baudrate = 2400;
} }

View File

@ -102,7 +102,7 @@ public class DigiplexBridgeHandler extends BaseBridgeHandler implements SerialPo
@Override @Override
public void initialize() { public void initialize() {
config = getConfigAs(DigiplexBridgeConfiguration.class); config = getConfigAs(DigiplexBridgeConfiguration.class);
if (config.port == null) { if (config.port.isBlank()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR, "Port must be set!"); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR, "Port must be set!");
return; return;
} }