From bf139b0ef2544b354c63c0fe4d2e2df22d506af9 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sat, 13 Jan 2024 17:12:49 +0100 Subject: [PATCH] Refactor java.util.Date usages to java.time.Instant (#16239) Signed-off-by: Jacob Laursen Signed-off-by: Ciprian Pascu --- .../binding/asuswrt/internal/AsuswrtDiscoveryService.java | 4 ++-- .../boschshc/internal/discovery/ThingDiscoveryService.java | 4 ++-- .../internal/discovery/SmartherModuleDiscoveryService.java | 4 ++-- .../deconz/internal/discovery/ThingDiscoveryService.java | 4 ++-- .../internal/discovery/DeviceDiscoveryService.java | 4 ++-- .../internal/discovery/SceneDiscoveryService.java | 4 ++-- .../discovery/ZoneTemperatureControlDiscoveryService.java | 4 ++-- .../internal/discovery/TrackerDiscoveryService.java | 4 ++-- .../hue/internal/discovery/Clip2ThingDiscoveryService.java | 4 ++-- .../hue/internal/discovery/HueDeviceDiscoveryService.java | 4 ++-- .../discovery/HydrawiseCloudControllerDiscoveryService.java | 4 ++-- .../internal/discovery/LivisiDeviceDiscoveryService.java | 4 ++-- .../max/internal/discovery/MaxDeviceDiscoveryService.java | 4 ++-- .../internal/discovery/XiaomiItemDiscoveryService.java | 4 ++-- .../binding/mqtt/discovery/AbstractMQTTDiscovery.java | 4 ++-- .../nobohub/internal/discovery/NoboHubDiscoveryService.java | 4 ++-- .../internal/discovery/NoboThingDiscoveryService.java | 4 ++-- .../onewire/internal/discovery/OwDiscoveryService.java | 4 ++-- .../internal/discovery/OpenWeatherMapDiscoveryService.java | 4 ++-- .../internal/discovery/TouchWandUnitDiscoveryService.java | 6 +++--- .../binding/tr064/internal/Tr064DiscoveryService.java | 4 ++-- .../tradfri/internal/discovery/TradfriDiscoveryService.java | 4 ++-- .../internal/discovery/VelbusThingDiscoveryService.java | 4 ++-- 23 files changed, 47 insertions(+), 47 deletions(-) diff --git a/bundles/org.openhab.binding.asuswrt/src/main/java/org/openhab/binding/asuswrt/internal/AsuswrtDiscoveryService.java b/bundles/org.openhab.binding.asuswrt/src/main/java/org/openhab/binding/asuswrt/internal/AsuswrtDiscoveryService.java index e56fd652b82..6abafc68e56 100644 --- a/bundles/org.openhab.binding.asuswrt/src/main/java/org/openhab/binding/asuswrt/internal/AsuswrtDiscoveryService.java +++ b/bundles/org.openhab.binding.asuswrt/src/main/java/org/openhab/binding/asuswrt/internal/AsuswrtDiscoveryService.java @@ -16,7 +16,7 @@ import static org.openhab.binding.asuswrt.internal.constants.AsuswrtBindingConst import static org.openhab.binding.asuswrt.internal.constants.AsuswrtBindingSettings.*; import static org.openhab.binding.asuswrt.internal.helpers.AsuswrtUtils.*; -import java.util.Date; +import java.time.Instant; import java.util.HashMap; import java.util.Map; @@ -95,7 +95,7 @@ public class AsuswrtDiscoveryService extends AbstractThingHandlerDiscoveryServic * Removes all scan results. */ private void removeAllResults() { - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } /** diff --git a/bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/discovery/ThingDiscoveryService.java b/bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/discovery/ThingDiscoveryService.java index aab73ed725d..3766ece6ebe 100644 --- a/bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/discovery/ThingDiscoveryService.java +++ b/bundles/org.openhab.binding.boschshc/src/main/java/org/openhab/binding/boschshc/internal/discovery/ThingDiscoveryService.java @@ -12,8 +12,8 @@ */ package org.openhab.binding.boschshc.internal.discovery; +import java.time.Instant; import java.util.AbstractMap; -import java.util.Date; import java.util.List; import java.util.Map; import java.util.Set; @@ -112,7 +112,7 @@ public class ThingDiscoveryService extends AbstractThingHandlerDiscoveryService< public void dispose() { super.dispose(); logger.trace("dispose"); - removeOlderResults(new Date().getTime(), thingHandler.getThing().getUID()); + removeOlderResults(Instant.now().toEpochMilli(), thingHandler.getThing().getUID()); thingHandler.unregisterDiscoveryListener(); super.deactivate(); diff --git a/bundles/org.openhab.binding.bticinosmarther/src/main/java/org/openhab/binding/bticinosmarther/internal/discovery/SmartherModuleDiscoveryService.java b/bundles/org.openhab.binding.bticinosmarther/src/main/java/org/openhab/binding/bticinosmarther/internal/discovery/SmartherModuleDiscoveryService.java index 6cff33630d9..0f5767d4ea4 100644 --- a/bundles/org.openhab.binding.bticinosmarther/src/main/java/org/openhab/binding/bticinosmarther/internal/discovery/SmartherModuleDiscoveryService.java +++ b/bundles/org.openhab.binding.bticinosmarther/src/main/java/org/openhab/binding/bticinosmarther/internal/discovery/SmartherModuleDiscoveryService.java @@ -14,7 +14,7 @@ package org.openhab.binding.bticinosmarther.internal.discovery; import static org.openhab.binding.bticinosmarther.internal.SmartherBindingConstants.*; -import java.util.Date; +import java.time.Instant; import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -86,7 +86,7 @@ public class SmartherModuleDiscoveryService extends AbstractThingHandlerDiscover public void dispose() { super.dispose(); logger.debug("Bridge[{}] Deactivating chronothermostat discovery service", this.bridgeUID); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } @Override diff --git a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/ThingDiscoveryService.java b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/ThingDiscoveryService.java index a255f699df0..1dbc90f6cb9 100644 --- a/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/ThingDiscoveryService.java +++ b/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/discovery/ThingDiscoveryService.java @@ -14,7 +14,7 @@ package org.openhab.binding.deconz.internal.discovery; import static org.openhab.binding.deconz.internal.BindingConstants.*; -import java.util.Date; +import java.time.Instant; import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -298,6 +298,6 @@ public class ThingDiscoveryService extends AbstractThingHandlerDiscoveryService< @Override public void dispose() { super.dispose(); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } } diff --git a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DeviceDiscoveryService.java b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DeviceDiscoveryService.java index a0760ad8f62..3a4d67afbc3 100644 --- a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DeviceDiscoveryService.java +++ b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/DeviceDiscoveryService.java @@ -14,8 +14,8 @@ package org.openhab.binding.digitalstrom.internal.discovery; import static org.openhab.binding.digitalstrom.internal.DigitalSTROMBindingConstants.BINDING_ID; +import java.time.Instant; import java.util.Arrays; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -76,7 +76,7 @@ public class DeviceDiscoveryService extends AbstractDiscoveryService { public void deactivate() { logger.debug("deactivate discovery service for device type {} thing types are: {}", deviceType, super.getSupportedThingTypes().toString()); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } @Override diff --git a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/SceneDiscoveryService.java b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/SceneDiscoveryService.java index 7f64c16e468..2f9f0e16453 100644 --- a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/SceneDiscoveryService.java +++ b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/SceneDiscoveryService.java @@ -17,8 +17,8 @@ import static org.openhab.binding.digitalstrom.internal.DigitalSTROMBindingConst import static org.openhab.binding.digitalstrom.internal.DigitalSTROMBindingConstants.SCENE_ID; import static org.openhab.binding.digitalstrom.internal.DigitalSTROMBindingConstants.ZONE_ID; +import java.time.Instant; import java.util.Arrays; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -73,7 +73,7 @@ public class SceneDiscoveryService extends AbstractDiscoveryService { public void deactivate() { logger.debug("deactivate discovery service for scene type {} remove thing tyspes {}", sceneType, super.getSupportedThingTypes()); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } @Override diff --git a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/ZoneTemperatureControlDiscoveryService.java b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/ZoneTemperatureControlDiscoveryService.java index 2abe6f53101..a193fdd8f3f 100644 --- a/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/ZoneTemperatureControlDiscoveryService.java +++ b/bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/discovery/ZoneTemperatureControlDiscoveryService.java @@ -14,8 +14,8 @@ package org.openhab.binding.digitalstrom.internal.discovery; import static org.openhab.binding.digitalstrom.internal.DigitalSTROMBindingConstants.BINDING_ID; +import java.time.Instant; import java.util.Arrays; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -77,7 +77,7 @@ public class ZoneTemperatureControlDiscoveryService extends AbstractDiscoverySer public void deactivate() { logger.debug("Deactivate discovery service for zone teperature control type remove thing types {}", super.getSupportedThingTypes()); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } /** diff --git a/bundles/org.openhab.binding.gpstracker/src/main/java/org/openhab/binding/gpstracker/internal/discovery/TrackerDiscoveryService.java b/bundles/org.openhab.binding.gpstracker/src/main/java/org/openhab/binding/gpstracker/internal/discovery/TrackerDiscoveryService.java index a38ec0924cc..09485b81fd7 100644 --- a/bundles/org.openhab.binding.gpstracker/src/main/java/org/openhab/binding/gpstracker/internal/discovery/TrackerDiscoveryService.java +++ b/bundles/org.openhab.binding.gpstracker/src/main/java/org/openhab/binding/gpstracker/internal/discovery/TrackerDiscoveryService.java @@ -12,7 +12,7 @@ */ package org.openhab.binding.gpstracker.internal.discovery; -import java.util.Date; +import java.time.Instant; import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -117,7 +117,7 @@ public class TrackerDiscoveryService extends AbstractDiscoveryService { @Override @Deactivate protected void deactivate() { - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); super.deactivate(); } diff --git a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/Clip2ThingDiscoveryService.java b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/Clip2ThingDiscoveryService.java index 75d8e86b767..63b014b0f73 100644 --- a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/Clip2ThingDiscoveryService.java +++ b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/Clip2ThingDiscoveryService.java @@ -14,7 +14,7 @@ package org.openhab.binding.hue.internal.discovery; import static org.openhab.binding.hue.internal.HueBindingConstants.*; -import java.util.Date; +import java.time.Instant; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; @@ -83,7 +83,7 @@ public class Clip2ThingDiscoveryService extends AbstractThingHandlerDiscoverySer public void dispose() { super.dispose(); thingHandler.unregisterDiscoveryService(); - removeOlderResults(new Date().getTime(), thingHandler.getThing().getBridgeUID()); + removeOlderResults(Instant.now().toEpochMilli(), thingHandler.getThing().getBridgeUID()); } /** diff --git a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/HueDeviceDiscoveryService.java b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/HueDeviceDiscoveryService.java index 99a203e14d9..5a81afad3fa 100644 --- a/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/HueDeviceDiscoveryService.java +++ b/bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/discovery/HueDeviceDiscoveryService.java @@ -14,8 +14,8 @@ package org.openhab.binding.hue.internal.discovery; import static org.openhab.binding.hue.internal.HueBindingConstants.*; +import java.time.Instant; import java.util.AbstractMap.SimpleEntry; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -127,7 +127,7 @@ public class HueDeviceDiscoveryService extends AbstractThingHandlerDiscoveryServ @Override public void dispose() { super.dispose(); - removeOlderResults(new Date().getTime(), bridgeUID); + removeOlderResults(Instant.now().toEpochMilli(), bridgeUID); thingHandler.unregisterDiscoveryListener(); } diff --git a/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/discovery/HydrawiseCloudControllerDiscoveryService.java b/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/discovery/HydrawiseCloudControllerDiscoveryService.java index ec1deb335a7..b01ab606325 100644 --- a/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/discovery/HydrawiseCloudControllerDiscoveryService.java +++ b/bundles/org.openhab.binding.hydrawise/src/main/java/org/openhab/binding/hydrawise/internal/discovery/HydrawiseCloudControllerDiscoveryService.java @@ -12,7 +12,7 @@ */ package org.openhab.binding.hydrawise.internal.discovery; -import java.util.Date; +import java.time.Instant; import java.util.List; import java.util.Set; @@ -56,7 +56,7 @@ public class HydrawiseCloudControllerDiscoveryService @Override public void dispose() { super.dispose(); - removeOlderResults(new Date().getTime(), thingHandler.getThing().getUID()); + removeOlderResults(Instant.now().toEpochMilli(), thingHandler.getThing().getUID()); } @Override diff --git a/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/discovery/LivisiDeviceDiscoveryService.java b/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/discovery/LivisiDeviceDiscoveryService.java index f3ce4a1c10a..88cfba093d7 100644 --- a/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/discovery/LivisiDeviceDiscoveryService.java +++ b/bundles/org.openhab.binding.livisismarthome/src/main/java/org/openhab/binding/livisismarthome/internal/discovery/LivisiDeviceDiscoveryService.java @@ -14,7 +14,7 @@ package org.openhab.binding.livisismarthome.internal.discovery; import static org.openhab.binding.livisismarthome.internal.LivisiBindingConstants.PROPERTY_ID; -import java.util.Date; +import java.time.Instant; import java.util.HashMap; import java.util.Map; import java.util.Optional; @@ -65,7 +65,7 @@ public class LivisiDeviceDiscoveryService extends AbstractThingHandlerDiscoveryS @Override public void dispose() { super.dispose(); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } @Override diff --git a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/discovery/MaxDeviceDiscoveryService.java b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/discovery/MaxDeviceDiscoveryService.java index 31b1e3a8c27..9c0b03af3d0 100644 --- a/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/discovery/MaxDeviceDiscoveryService.java +++ b/bundles/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/discovery/MaxDeviceDiscoveryService.java @@ -12,7 +12,7 @@ */ package org.openhab.binding.max.internal.discovery; -import java.util.Date; +import java.time.Instant; import java.util.Set; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -60,7 +60,7 @@ public class MaxDeviceDiscoveryService extends AbstractThingHandlerDiscoveryServ public void dispose() { super.dispose(); thingHandler.unregisterDeviceStatusListener(this); - removeOlderResults(new Date().getTime(), thingHandler.getThing().getUID()); + removeOlderResults(Instant.now().toEpochMilli(), thingHandler.getThing().getUID()); } @Override diff --git a/bundles/org.openhab.binding.mihome/src/main/java/org/openhab/binding/mihome/internal/discovery/XiaomiItemDiscoveryService.java b/bundles/org.openhab.binding.mihome/src/main/java/org/openhab/binding/mihome/internal/discovery/XiaomiItemDiscoveryService.java index 3f8a0d13cc5..63c7245d116 100644 --- a/bundles/org.openhab.binding.mihome/src/main/java/org/openhab/binding/mihome/internal/discovery/XiaomiItemDiscoveryService.java +++ b/bundles/org.openhab.binding.mihome/src/main/java/org/openhab/binding/mihome/internal/discovery/XiaomiItemDiscoveryService.java @@ -15,8 +15,8 @@ package org.openhab.binding.mihome.internal.discovery; import static org.openhab.binding.mihome.internal.ModelMapper.*; import static org.openhab.binding.mihome.internal.XiaomiGatewayBindingConstants.*; +import java.time.Instant; import java.util.Arrays; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Map; @@ -86,7 +86,7 @@ public class XiaomiItemDiscoveryService extends AbstractDiscoveryService impleme } public void onHandlerRemoved() { - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } @Override diff --git a/bundles/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/discovery/AbstractMQTTDiscovery.java b/bundles/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/discovery/AbstractMQTTDiscovery.java index 0ed728b7180..5fe3ebe1481 100644 --- a/bundles/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/discovery/AbstractMQTTDiscovery.java +++ b/bundles/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/discovery/AbstractMQTTDiscovery.java @@ -12,7 +12,7 @@ */ package org.openhab.binding.mqtt.discovery; -import java.util.Date; +import java.time.Instant; import java.util.Set; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; @@ -139,7 +139,7 @@ public abstract class AbstractMQTTDiscovery extends AbstractDiscoveryService imp @Override protected void startBackgroundDiscovery() { // Remove results that are restored after a restart - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); subscribe(); } diff --git a/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboHubDiscoveryService.java b/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboHubDiscoveryService.java index 71e5c3b1699..8abb65a0afa 100644 --- a/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboHubDiscoveryService.java +++ b/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboHubDiscoveryService.java @@ -27,7 +27,7 @@ import java.net.DatagramSocket; import java.net.InetAddress; import java.net.MulticastSocket; import java.time.Duration; -import java.util.Date; +import java.time.Instant; import java.util.HashMap; import java.util.Map; @@ -72,7 +72,7 @@ public class NoboHubDiscoveryService extends AbstractThingHandlerDiscoveryServic @Override public void dispose() { super.dispose(); - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } private final Runnable scanner = new Runnable() { diff --git a/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboThingDiscoveryService.java b/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboThingDiscoveryService.java index 6a533625312..36f257305ad 100644 --- a/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboThingDiscoveryService.java +++ b/bundles/org.openhab.binding.nobohub/src/main/java/org/openhab/binding/nobohub/internal/discovery/NoboThingDiscoveryService.java @@ -22,8 +22,8 @@ import static org.openhab.binding.nobohub.internal.NoboHubBindingConstants.PROPE import static org.openhab.binding.nobohub.internal.NoboHubBindingConstants.THING_TYPE_COMPONENT; import static org.openhab.binding.nobohub.internal.NoboHubBindingConstants.THING_TYPE_ZONE; +import java.time.Instant; import java.util.Collection; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -71,7 +71,7 @@ public class NoboThingDiscoveryService extends AbstractDiscoveryService { @Override public void deactivate() { - removeOlderResults(new Date().getTime()); + removeOlderResults(Instant.now().toEpochMilli()); } public void detectZones(Collection zones) { diff --git a/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/discovery/OwDiscoveryService.java b/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/discovery/OwDiscoveryService.java index 3312659dc5b..3039ebdc4dd 100644 --- a/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/discovery/OwDiscoveryService.java +++ b/bundles/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/discovery/OwDiscoveryService.java @@ -14,7 +14,7 @@ package org.openhab.binding.onewire.internal.discovery; import static org.openhab.binding.onewire.internal.OwBindingConstants.*; -import java.util.Date; +import java.time.Instant; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -134,6 +134,6 @@ public class OwDiscoveryService extends AbstractThingHandlerDiscoveryService