Skip to content

Commit

Permalink
Fix SAT errors (#18047)
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Siepel <[email protected]>
  • Loading branch information
lsiepel authored Jan 6, 2025
1 parent 8a442d9 commit 7639b1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
*/
package org.openhab.binding.digiplex.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* The {@link DigiplexAreaConfiguration} class contains fields mapping area configuration parameters.
*
* @author Robert Michalak - Initial contribution
*/
@NonNullByDefault
public class DigiplexAreaConfiguration {

public int refreshPeriod;
public int refreshPeriod = 60;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
*/
package org.openhab.binding.digiplex.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* The {@link DigiplexBridgeConfiguration} class contains fields mapping bridge configuration parameters.
*
* @author Robert Michalak - Initial contribution
*/
@NonNullByDefault
public class DigiplexBridgeConfiguration {

public String port;
public int baudrate;
public String port = "";
public int baudrate = 2400;
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public DigiplexBridgeHandler(Bridge bridge, SerialPortManager serialPortManager)
@Override
public void initialize() {
config = getConfigAs(DigiplexBridgeConfiguration.class);
if (config.port == null) {
if (config.port.isBlank()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR, "Port must be set!");
return;
}
Expand Down

0 comments on commit 7639b1c

Please sign in to comment.