Avoid star imports and add missing braces (#10521)
Fixes the following SAT findings: * AvoidStarImportCheck (125) * NeedBracesCheck (39) Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -181,8 +181,9 @@ public abstract class CommonRpcParser<M, R> implements RpcParser<M, R> {
|
||||
dp.setUnit("dBm");
|
||||
}
|
||||
// Bypass: For at least one device the CCU does not send a unit together with the value
|
||||
if (dp.getUnit() == null && dp.getName().startsWith(HomematicConstants.DATAPOINT_NAME_OPERATING_VOLTAGE))
|
||||
if (dp.getUnit() == null && dp.getName().startsWith(HomematicConstants.DATAPOINT_NAME_OPERATING_VOLTAGE)) {
|
||||
dp.setUnit("V");
|
||||
}
|
||||
|
||||
HmValueType valueType = HmValueType.parse(type);
|
||||
if (valueType == null || valueType == HmValueType.UNKNOWN) {
|
||||
|
||||
@@ -417,8 +417,9 @@ public class HomematicThingHandler extends BaseThingHandler {
|
||||
loadHomematicChannelValues(device.getChannel(0));
|
||||
|
||||
ThingStatus oldStatus = thing.getStatus();
|
||||
if (oldStatus == ThingStatus.UNINITIALIZED)
|
||||
if (oldStatus == ThingStatus.UNINITIALIZED) {
|
||||
return;
|
||||
}
|
||||
ThingStatus newStatus = ThingStatus.ONLINE;
|
||||
ThingStatusDetail newDetail = ThingStatusDetail.NONE;
|
||||
|
||||
|
||||
@@ -332,8 +332,9 @@ public class MetadataUtils {
|
||||
case "m3":
|
||||
return ITEM_TYPE_NUMBER + ":Volume";
|
||||
case "":
|
||||
if (dpName.startsWith(DATAPOINT_NAME_OPERATING_VOLTAGE))
|
||||
if (dpName.startsWith(DATAPOINT_NAME_OPERATING_VOLTAGE)) {
|
||||
return ITEM_TYPE_NUMBER + ":ElectricPotential";
|
||||
}
|
||||
case "s":
|
||||
case "min":
|
||||
case "minutes":
|
||||
|
||||
Reference in New Issue
Block a user