From 70a9c79e6eeb4252026f588b5d28bbb4ab3fd212 Mon Sep 17 00:00:00 2001 From: Thomas Leber Date: Sat, 7 Dec 2024 16:28:53 +0100 Subject: [PATCH] [awattar] fix more naming and remove outdated variable Signed-off-by: Thomas Leber --- .../internal/AwattarNonConsecutiveBestPriceResult.java | 2 -- .../binding/awattar/internal/AwattarBestPriceTest.java | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java index 09f09db9c0d..c8303299279 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java @@ -32,7 +32,6 @@ import org.eclipse.jdt.annotation.NonNullByDefault; public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult { private final List members; private final ZoneId zoneId; - private boolean sorted = true; public AwattarNonConsecutiveBestPriceResult(List prices, int length, boolean inverted, ZoneId zoneId) { @@ -57,7 +56,6 @@ public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult } private void addMember(AwattarPrice member) { - sorted = false; members.add(member); updateStart(member.timerange().start()); updateEnd(member.timerange().end()); diff --git a/bundles/org.openhab.binding.awattar/src/test/java/org/openhab/binding/awattar/internal/AwattarBestPriceTest.java b/bundles/org.openhab.binding.awattar/src/test/java/org/openhab/binding/awattar/internal/AwattarBestPriceTest.java index b180f11482a..e48c7ef6c9b 100644 --- a/bundles/org.openhab.binding.awattar/src/test/java/org/openhab/binding/awattar/internal/AwattarBestPriceTest.java +++ b/bundles/org.openhab.binding.awattar/src/test/java/org/openhab/binding/awattar/internal/AwattarBestPriceTest.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.SortedSet; import java.util.TreeSet; +import org.eclipse.jdt.annotation.NonNullByDefault; import org.junit.jupiter.api.Test; import org.openhab.binding.awattar.internal.handler.TimeRange; @@ -34,6 +35,7 @@ import org.openhab.binding.awattar.internal.handler.TimeRange; * * @author Thomas Leber - Initial contribution */ +@NonNullByDefault public class AwattarBestPriceTest { private ZoneId zoneId = ZoneId.of("GMT"); @@ -86,7 +88,7 @@ public class AwattarBestPriceTest { } @Test - void AwattarNonConsecutiveBestPriceResult_nonInverted() { + void AwattarNonConsecutiveBestPriceResultNonInverted() { int length = 6; boolean inverted = false; @@ -99,7 +101,7 @@ public class AwattarBestPriceTest { } @Test - void AwattarNonConsecutiveBestPriceResult_inverted() { + void AwattarNonConsecutiveBestPriceResultInverted() { int length = 4; boolean inverted = true;