Fix SAT warnings (#14202)
* Fix SAT warnings - checkstyle.ModifierOrderCheck - checkstyle.OneStatementPerLineCheck - checkstyle.NeedBracesCheck - PMD.UseStandardCharsets - PMD.UseCollectionIsEmpty - PMD.UnusedLocalVariable - PMD.SimplifyBooleanReturns where reasonable, suppress where readability is better without change - PMD.SimplifyBooleanExpressions * Include StandardCharsets Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -443,10 +443,10 @@ public class GlobalCacheHandler extends BaseThingHandler {
|
||||
private Logger logger = LoggerFactory.getLogger(CommandProcessor.class);
|
||||
|
||||
private boolean terminate = false;
|
||||
private final String TERMINATE_COMMAND = "terminate";
|
||||
private static final String TERMINATE_COMMAND = "terminate";
|
||||
|
||||
private final int SEND_QUEUE_MAX_DEPTH = 10;
|
||||
private final int SEND_QUEUE_TIMEOUT = 2000;
|
||||
private static final int SEND_QUEUE_MAX_DEPTH = 10;
|
||||
private static final int SEND_QUEUE_TIMEOUT = 2000;
|
||||
|
||||
private ConnectionManager connectionManager;
|
||||
|
||||
@@ -594,19 +594,19 @@ public class GlobalCacheHandler extends BaseThingHandler {
|
||||
|
||||
private boolean deviceIsConnected;
|
||||
|
||||
private final String COMMAND_NAME = "command";
|
||||
private final String SERIAL1_NAME = "serial-1";
|
||||
private final String SERIAL2_NAME = "serial-2";
|
||||
private static final String COMMAND_NAME = "command";
|
||||
private static final String SERIAL1_NAME = "serial-1";
|
||||
private static final String SERIAL2_NAME = "serial-2";
|
||||
|
||||
private final int COMMAND_PORT = 4998;
|
||||
private final int SERIAL1_PORT = 4999;
|
||||
private final int SERIAL2_PORT = 5000;
|
||||
private static final int COMMAND_PORT = 4998;
|
||||
private static final int SERIAL1_PORT = 4999;
|
||||
private static final int SERIAL2_PORT = 5000;
|
||||
|
||||
private final int SOCKET_CONNECT_TIMEOUT = 1500;
|
||||
private static final int SOCKET_CONNECT_TIMEOUT = 1500;
|
||||
|
||||
private ScheduledFuture<?> connectionMonitorJob;
|
||||
private final int CONNECTION_MONITOR_FREQUENCY = 60;
|
||||
private final int CONNECTION_MONITOR_START_DELAY = 15;
|
||||
private static final int CONNECTION_MONITOR_FREQUENCY = 60;
|
||||
private static final int CONNECTION_MONITOR_START_DELAY = 15;
|
||||
|
||||
private Runnable connectionMonitorRunnable = () -> {
|
||||
logger.trace("Performing connection check for thing {} at IP {}", thingID(), commandConnection.getIP());
|
||||
@@ -844,10 +844,7 @@ public class GlobalCacheHandler extends BaseThingHandler {
|
||||
}
|
||||
|
||||
private boolean deviceSupportsSerialPort2() {
|
||||
if (thing.getThingTypeUID().equals(THING_TYPE_GC_100_12)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return thing.getThingTypeUID().equals(THING_TYPE_GC_100_12);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user