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:
Wouter Born
2021-04-15 16:12:05 +02:00
committed by GitHub
parent e24d43aecb
commit 0c36650179
110 changed files with 793 additions and 217 deletions

View File

@@ -239,7 +239,7 @@ public class NuvoHandler extends BaseThingHandler implements NuvoMessageEventLis
*
* @param channelUID the channel sending the command
* @param command the command received
*
*
*/
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
@@ -306,8 +306,9 @@ public class NuvoHandler extends BaseThingHandler implements NuvoMessageEventLis
int value = ((DecimalType) command).intValue();
if (value >= MIN_EQ && value <= MAX_EQ) {
// device can only accept even values
if (value % 2 == 1)
if (value % 2 == 1) {
value++;
}
logger.debug("Got treble command {} zone {}", value, target);
connector.sendCfgCommand(target, NuvoCommand.TREBLE, String.valueOf(value));
}
@@ -317,8 +318,9 @@ public class NuvoHandler extends BaseThingHandler implements NuvoMessageEventLis
if (command instanceof DecimalType) {
int value = ((DecimalType) command).intValue();
if (value >= MIN_EQ && value <= MAX_EQ) {
if (value % 2 == 1)
if (value % 2 == 1) {
value++;
}
logger.debug("Got bass command {} zone {}", value, target);
connector.sendCfgCommand(target, NuvoCommand.BASS, String.valueOf(value));
}
@@ -328,8 +330,9 @@ public class NuvoHandler extends BaseThingHandler implements NuvoMessageEventLis
if (command instanceof DecimalType) {
int value = ((DecimalType) command).intValue();
if (value >= MIN_EQ && value <= MAX_EQ) {
if (value % 2 == 1)
if (value % 2 == 1) {
value++;
}
logger.debug("Got balance command {} zone {}", value, target);
connector.sendCfgCommand(target, NuvoCommand.BALANCE,
NuvoStatusCodes.getBalanceFromInt(value));