From fad9107a200ac14458b1557c47f52a6242bd02fb Mon Sep 17 00:00:00 2001 From: mlobstein Date: Sun, 12 Jan 2025 15:37:21 -0600 Subject: [PATCH] Refactor usages of deprecated methods (#18097) Signed-off-by: Michael Lobstein --- .../internal/discovery/PanaBlurayDiscoveryParticipant.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.panasonicbdp/src/main/java/org/openhab/binding/panasonicbdp/internal/discovery/PanaBlurayDiscoveryParticipant.java b/bundles/org.openhab.binding.panasonicbdp/src/main/java/org/openhab/binding/panasonicbdp/internal/discovery/PanaBlurayDiscoveryParticipant.java index 3430442b008..d2ffa46513d 100644 --- a/bundles/org.openhab.binding.panasonicbdp/src/main/java/org/openhab/binding/panasonicbdp/internal/discovery/PanaBlurayDiscoveryParticipant.java +++ b/bundles/org.openhab.binding.panasonicbdp/src/main/java/org/openhab/binding/panasonicbdp/internal/discovery/PanaBlurayDiscoveryParticipant.java @@ -14,7 +14,6 @@ package org.openhab.binding.panasonicbdp.internal.discovery; import static org.openhab.binding.panasonicbdp.internal.PanaBlurayBindingConstants.*; -import java.net.URL; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -62,12 +61,10 @@ public class PanaBlurayDiscoveryParticipant implements UpnpDiscoveryParticipant final ThingUID uid = getThingUID(device); if (uid != null) { final Map properties = new HashMap<>(2); - - final URL url = device.getIdentity().getDescriptorURL(); final String label = device.getDetails().getFriendlyName(); properties.put(PROPERTY_UUID, uid.getId()); - properties.put(PROPERTY_HOST_NAME, url.getHost()); + properties.put(PROPERTY_HOST_NAME, device.getIdentity().getDescriptorURL().getHost()); final DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties) .withRepresentationProperty(PROPERTY_UUID).withLabel(label).build();