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:
@@ -33,13 +33,13 @@ import org.openhab.core.thing.ThingUID;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class RFXComTestHelper {
|
||||
static final public ThingUID bridgeUID = new ThingUID("rfxcom", "tcpbridge", "rfxtrx0");
|
||||
static final public ThingUID thingUID = new ThingUID("rfxcom", bridgeUID, "mocked");
|
||||
static final public ThingTypeUID thingTypeUID = new ThingTypeUID("rfxcom", "raw");
|
||||
public static final ThingUID bridgeUID = new ThingUID("rfxcom", "tcpbridge", "rfxtrx0");
|
||||
public static final ThingUID thingUID = new ThingUID("rfxcom", bridgeUID, "mocked");
|
||||
public static final ThingTypeUID thingTypeUID = new ThingTypeUID("rfxcom", "raw");
|
||||
|
||||
static final public ChannelUID commandChannelUID = new ChannelUID(thingUID, RFXComBindingConstants.CHANNEL_COMMAND);
|
||||
public static final ChannelUID commandChannelUID = new ChannelUID(thingUID, RFXComBindingConstants.CHANNEL_COMMAND);
|
||||
|
||||
static public void basicBoundaryCheck(PacketType packetType, RFXComMessage message) throws RFXComException {
|
||||
public static void basicBoundaryCheck(PacketType packetType, RFXComMessage message) throws RFXComException {
|
||||
// This is a place where its easy to make mistakes in coding, and can result in errors, normally
|
||||
// array bounds errors
|
||||
byte[] binaryMessage = message.decodeMessage();
|
||||
@@ -47,7 +47,7 @@ public class RFXComTestHelper {
|
||||
assertEquals(packetType.toByte(), binaryMessage[1], "Wrong packet type");
|
||||
}
|
||||
|
||||
static public int getActualIntValue(RFXComDeviceMessage msg, RFXComDeviceConfiguration config, String channelId)
|
||||
public static int getActualIntValue(RFXComDeviceMessage msg, RFXComDeviceConfiguration config, String channelId)
|
||||
throws RFXComException {
|
||||
return ((DecimalType) msg.convertToState(channelId, config, new MockDeviceState())).intValue();
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ import org.openhab.core.util.HexUtils;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class RFXComLighting4MessageTest {
|
||||
static public final ChannelUID contactChannelUID = new ChannelUID(thingUID, CHANNEL_CONTACT);
|
||||
public static final ChannelUID contactChannelUID = new ChannelUID(thingUID, CHANNEL_CONTACT);
|
||||
|
||||
static public void checkDiscoveryResult(RFXComDeviceMessage<RFXComLighting4Message.SubType> msg, String deviceId,
|
||||
public static void checkDiscoveryResult(RFXComDeviceMessage<RFXComLighting4Message.SubType> msg, String deviceId,
|
||||
@Nullable Integer pulse, String subType) throws RFXComException {
|
||||
String thingUID = "homeduino:rfxcom:fssfsd:thing";
|
||||
DiscoveryResultBuilder builder = DiscoveryResultBuilder.create(new ThingUID(thingUID));
|
||||
|
||||
Reference in New Issue
Block a user