mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-30 00:51:58 +01:00
Refactor usages of deprecated methods (#18097)
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
parent
7598cf9bc7
commit
fad9107a20
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user