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.tellstick.internal.core;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Collections;
import java.util.SortedMap;
import java.util.TreeMap;
@@ -119,7 +120,7 @@ public class TelldusCoreDeviceController implements DeviceChangeListener, Sensor
case JNA.CLibrary.TELLSTICK_DIM:
dimValue = new BigDecimal(((TellstickDevice) device).getData());
dimValue = dimValue.multiply(new BigDecimal(100));
dimValue = dimValue.divide(new BigDecimal(255), 0, BigDecimal.ROUND_HALF_UP);
dimValue = dimValue.divide(new BigDecimal(255), 0, RoundingMode.HALF_UP);
break;
default:
logger.warn("Could not handle {} for {}", ((TellstickDevice) device).getStatus(), device);

View File

@@ -13,6 +13,7 @@
package org.openhab.binding.tellstick.internal.live;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -248,7 +249,7 @@ public class TelldusLiveDeviceController implements DeviceChangeListener, Sensor
case JNA.CLibrary.TELLSTICK_DIM:
dimValue = new BigDecimal(((TellstickNetDevice) device).getStatevalue());
dimValue = dimValue.multiply(new BigDecimal(100));
dimValue = dimValue.divide(new BigDecimal(255), 0, BigDecimal.ROUND_HALF_UP);
dimValue = dimValue.divide(new BigDecimal(255), 0, RoundingMode.HALF_UP);
break;
default:
logger.warn("Could not handle {} for {}", (((TellstickNetDevice) device).getState()), device);

View File

@@ -13,6 +13,7 @@
package org.openhab.binding.tellstick.internal.local;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
@@ -221,7 +222,7 @@ public class TelldusLocalDeviceController implements DeviceChangeListener, Senso
case JNA.CLibrary.TELLSTICK_DIM:
dimValue = new BigDecimal(((TellstickLocalDeviceDTO) device).getStatevalue());
dimValue = dimValue.multiply(new BigDecimal(100));
dimValue = dimValue.divide(new BigDecimal(255), 0, BigDecimal.ROUND_HALF_UP);
dimValue = dimValue.divide(new BigDecimal(255), 0, RoundingMode.HALF_UP);
break;
default:
logger.warn("Could not handle {} for {}", (((TellstickLocalDeviceDTO) device).getState()), device);