Skip to content

Commit fad9107

Browse files
authored
Refactor usages of deprecated methods (openhab#18097)
Signed-off-by: Michael Lobstein <[email protected]>
1 parent 7598cf9 commit fad9107

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bundles/org.openhab.binding.panasonicbdp/src/main/java/org/openhab/binding/panasonicbdp/internal/discovery/PanaBlurayDiscoveryParticipant.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import static org.openhab.binding.panasonicbdp.internal.PanaBlurayBindingConstants.*;
1616

17-
import java.net.URL;
1817
import java.util.HashMap;
1918
import java.util.List;
2019
import java.util.Map;
@@ -62,12 +61,10 @@ public Set<ThingTypeUID> getSupportedThingTypeUIDs() {
6261
final ThingUID uid = getThingUID(device);
6362
if (uid != null) {
6463
final Map<String, Object> properties = new HashMap<>(2);
65-
66-
final URL url = device.getIdentity().getDescriptorURL();
6764
final String label = device.getDetails().getFriendlyName();
6865

6966
properties.put(PROPERTY_UUID, uid.getId());
70-
properties.put(PROPERTY_HOST_NAME, url.getHost());
67+
properties.put(PROPERTY_HOST_NAME, device.getIdentity().getDescriptorURL().getHost());
7168

7269
final DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)
7370
.withRepresentationProperty(PROPERTY_UUID).withLabel(label).build();

0 commit comments

Comments
 (0)