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:
Holger Friedrich
2023-01-13 08:11:06 +01:00
committed by GitHub
parent 6aa0dcbc70
commit 4e44de3894
86 changed files with 148 additions and 157 deletions

View File

@@ -32,7 +32,7 @@ public enum PartitionCommand {
DISARM(6),
BEEP(8);
private final static Logger logger = LoggerFactory.getLogger(PartitionCommand.class);
private static final Logger logger = LoggerFactory.getLogger(PartitionCommand.class);
private int command;

View File

@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
public class ParadoxUtil {
private static final String SPACE_DELIMITER = " ";
private final static Logger logger = LoggerFactory.getLogger(ParadoxUtil.class);
private static final Logger logger = LoggerFactory.getLogger(ParadoxUtil.class);
public static byte calculateChecksum(byte[] payload) {
int result = 0;

View File

@@ -41,7 +41,7 @@ public class TestGetBytes {
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "TRACE");
}
private final static Logger logger = LoggerFactory.getLogger(ParadoxUtil.class);
private static final Logger logger = LoggerFactory.getLogger(ParadoxUtil.class);
private static final byte[] EXPECTED1 = { (byte) 0xAA, 0x0A, 0x00, 0x03, 0x08, (byte) 0xF0, 0x00, 0x00, 0x01,
(byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, 0x01, 0x02, 0x03,