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

@@ -13,6 +13,7 @@
package org.openhab.binding.tado.internal.adapter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.OffsetDateTime;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
@@ -48,7 +49,7 @@ import org.openhab.core.types.UnDefType;
*
* @author Dennis Frommknecht - Initial contribution
* @author Andrew Fiddian-Green - Added Low Battery Alarm, A/C Power and Open Window channels
*
*
*/
public class TadoZoneStateAdapter {
private ZoneState zoneState;
@@ -199,7 +200,7 @@ public class TadoZoneStateAdapter {
}
private static DecimalType toDecimalType(double value) {
BigDecimal decimal = new BigDecimal(value).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal decimal = new BigDecimal(value).setScale(2, RoundingMode.HALF_UP);
return new DecimalType(decimal);
}

View File

@@ -31,7 +31,7 @@ public abstract class BaseHomeThingHandler extends BaseThingHandler {
public Long getHomeId() {
TadoHomeHandler handler = getHomeHandler();
return handler != null ? handler.getHomeId() : new Long(0);
return handler != null ? handler.getHomeId() : Long.valueOf(0);
}
protected TadoHomeHandler getHomeHandler() {