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.feican.internal;
import java.math.BigDecimal;
import java.math.RoundingMode;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.library.types.HSBType;
@@ -82,7 +83,7 @@ public class Commands {
*/
private byte convertColorPercentToByte(PercentType percent) {
return percent.toBigDecimal().multiply(BigDecimal.valueOf(255))
.divide(BigDecimal.valueOf(100), 2, BigDecimal.ROUND_HALF_UP).byteValue();
.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).byteValue();
}
/**