Fix Java and Jetty deprecations (#10349)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-03-19 10:40:14 +01:00
committed by GitHub
parent 580f293766
commit fe0c35d22f
43 changed files with 98 additions and 80 deletions

View File

@@ -136,7 +136,7 @@ public class HVACHandler extends BaseThingHandler {
if (command instanceof RefreshType) {
final String currentTemp = query(controller, "a");
if (currentTemp != null) {
final Integer temp = new Integer(currentTemp);
final Integer temp = Integer.parseInt(currentTemp);
final QuantityType<?> value = new QuantityType<>(temp, controller.getUnit());
updateState(CURRENT_TEMP, value);
}
@@ -157,7 +157,7 @@ public class HVACHandler extends BaseThingHandler {
if (command instanceof RefreshType) {
final String setTemp = query(controller, "t");
if (setTemp != null) {
final Integer temp = new Integer(setTemp);
final Integer temp = Integer.parseInt(setTemp);
final QuantityType<?> value = new QuantityType<>(temp, controller.getUnit());
updateState(SET_TEMP, value);
}