Java 17 features (H-M) (#15520)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings - remove null check before instanceof Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -74,8 +74,8 @@ public class CurtainHandler extends BaseThingHandler {
|
||||
(command == UpDownType.UP) ? ControlAddress.OPEN : ControlAddress.CLOSE);
|
||||
} else if (command instanceof StopMoveType) {
|
||||
pkt = buildPacket(Function.CONTROL, ControlAddress.STOP);
|
||||
} else if (command instanceof DecimalType) {
|
||||
pkt = buildPacket(Function.CONTROL, ControlAddress.PERCENT, ((DecimalType) command).byteValue());
|
||||
} else if (command instanceof DecimalType decimalCommand) {
|
||||
pkt = buildPacket(Function.CONTROL, ControlAddress.PERCENT, decimalCommand.byteValue());
|
||||
}
|
||||
break;
|
||||
case CHANNEL_REVERSE:
|
||||
|
||||
Reference in New Issue
Block a user