Refactor usages of deprecated methods (#18097)

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
mlobstein 2025-01-12 15:37:21 -06:00 committed by GitHub
parent 7598cf9bc7
commit fad9107a20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<String, Object> 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();