Skip to content

Commit

Permalink
Replaced deprecated methods (openhab#7403)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Weitkamp <[email protected]>
  • Loading branch information
cweitkamp authored and markus7017 committed Sep 18, 2020
1 parent d0a06dc commit f0681df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public Set<ThingTypeUID> getSupportedThingTypeUIDs() {
}

@Override
@SuppressWarnings("deprecation")
public DiscoveryResult createResult(ServiceInfo info) {
DiscoveryResult result = null;
ThingUID uid = getThingUID(info);
Expand All @@ -66,7 +65,7 @@ public DiscoveryResult createResult(ServiceInfo info) {
Map<String, Object> properties = new HashMap<>(2);

String label = null;
if (BST_10_THING_TYPE_UID.equals(uid.getThingTypeUID())) {
if (BST_10_THING_TYPE_UID.equals(getThingTypeUID(info))) {
try {
String group = DiscoveryUtil.executeUrl("http://" + addrs[0].getHostAddress() + ":8090/getGroup");
label = DiscoveryUtil.getContentOfFirstElement(group, "name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ private void addThing(ThingUID bridgeUID, String thingType, String thingID) {
}

if (thingUID != null) {
logger.trace("Adding new Discovery thingType: {} bridgeType: {}", thingUID.getThingTypeUID().getId(),
bridgeUID.getThingTypeUID().getId());
logger.trace("Adding new Discovery thingType: {} bridgeType: {}", thingUID, bridgeUID);
DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(thingUID).withBridge(bridgeUID)
.withLabel(thingID).build();
logger.trace("call register: {} label: {}", discoveryResult.getBindingId(), discoveryResult.getLabel());
Expand Down

0 comments on commit f0681df

Please sign in to comment.