From 00a9cf3ba8f4ac4ebfb70fb16974a5da169c1004 Mon Sep 17 00:00:00 2001 From: Christoph Weitkamp Date: Tue, 2 Oct 2018 16:49:37 +0200 Subject: [PATCH] Removed Guava dependency Signed-off-by: Christoph Weitkamp --- .../org.openhab.binding.gardena/META-INF/MANIFEST.MF | 1 - .../internal/discovery/GardenaDeviceDiscoveryService.java | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/binding/org.openhab.binding.gardena/META-INF/MANIFEST.MF b/addons/binding/org.openhab.binding.gardena/META-INF/MANIFEST.MF index ed60de08d389d..c63ae6534f510 100644 --- a/addons/binding/org.openhab.binding.gardena/META-INF/MANIFEST.MF +++ b/addons/binding/org.openhab.binding.gardena/META-INF/MANIFEST.MF @@ -9,7 +9,6 @@ Bundle-SymbolicName: org.openhab.binding.gardena;singleton:=true Bundle-Vendor: openHAB Bundle-Version: 2.4.0.qualifier Import-Package: - com.google.common.collect, com.google.gson, com.google.gson.annotations, org.apache.commons.collections, diff --git a/addons/binding/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/discovery/GardenaDeviceDiscoveryService.java b/addons/binding/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/discovery/GardenaDeviceDiscoveryService.java index 66122d79b457a..e5e79bf3752a6 100644 --- a/addons/binding/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/discovery/GardenaDeviceDiscoveryService.java +++ b/addons/binding/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/discovery/GardenaDeviceDiscoveryService.java @@ -10,8 +10,11 @@ import static org.openhab.binding.gardena.internal.GardenaBindingConstants.BINDING_ID; +import java.util.Collections; import java.util.concurrent.CancellationException; import java.util.concurrent.Future; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.eclipse.smarthome.config.discovery.AbstractDiscoveryService; import org.eclipse.smarthome.config.discovery.DiscoveryResult; @@ -28,8 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.collect.ImmutableSet; - /** * The {@link GardenaDeviceDiscoveryService} is used to discover devices that are connected to Gardena Smart Home. * @@ -44,7 +45,8 @@ public class GardenaDeviceDiscoveryService extends AbstractDiscoveryService { private Future scanFuture; public GardenaDeviceDiscoveryService(GardenaAccountHandler accountHandler) { - super(ImmutableSet.of(new ThingTypeUID(BINDING_ID, "-")), DISCOVER_TIMEOUT_SECONDS, false); + super(Collections.unmodifiableSet(Stream.of(new ThingTypeUID(BINDING_ID, "-")).collect(Collectors.toSet())), + DISCOVER_TIMEOUT_SECONDS, false); this.accountHandler = accountHandler; }