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:
@@ -82,11 +82,9 @@ public class HaasSohnpelletstoveHandler extends BaseThingHandler {
|
||||
updateOvenData(postData);
|
||||
}
|
||||
} else if (channelUID.getId().equals(CHANNELSPTEMP)) {
|
||||
if (command instanceof QuantityType<?>) {
|
||||
QuantityType<?> value = (QuantityType<?>) command;
|
||||
|
||||
if (command instanceof QuantityType<?> quantityCommand) {
|
||||
Unit<Temperature> unit = SIUnits.CELSIUS;
|
||||
value = value.toUnit(unit);
|
||||
QuantityType<?> value = quantityCommand.toUnit(unit);
|
||||
if (value != null) {
|
||||
double a = value.doubleValue();
|
||||
String postdata = "{\"sp_temp\":" + a + "}";
|
||||
|
||||
@@ -38,8 +38,7 @@ public class MD5Utils {
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
byte[] result = md.digest(input);
|
||||
return result;
|
||||
return md.digest(input);
|
||||
}
|
||||
|
||||
private static String bytesToHex(byte[] bytes) {
|
||||
|
||||
Reference in New Issue
Block a user