[deconz] Fix compiler warning (#12403)
* Fix compiler warning and info. Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>pull/12410/head
parent
93e3a710e1
commit
c5a2a1fbdf
|
@ -24,6 +24,7 @@ import org.openhab.core.thing.ChannelUID;
|
||||||
import org.openhab.core.thing.ThingUID;
|
import org.openhab.core.thing.ThingUID;
|
||||||
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
|
import org.openhab.core.thing.binding.BaseDynamicStateDescriptionProvider;
|
||||||
import org.openhab.core.thing.events.ThingEventFactory;
|
import org.openhab.core.thing.events.ThingEventFactory;
|
||||||
|
import org.openhab.core.thing.link.ItemChannelLinkRegistry;
|
||||||
import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
|
import org.openhab.core.thing.type.DynamicStateDescriptionProvider;
|
||||||
import org.openhab.core.types.StateDescription;
|
import org.openhab.core.types.StateDescription;
|
||||||
import org.openhab.core.types.StateDescriptionFragment;
|
import org.openhab.core.types.StateDescriptionFragment;
|
||||||
|
@ -58,6 +59,7 @@ public class DeconzDynamicStateDescriptionProvider extends BaseDynamicStateDescr
|
||||||
if (!stateDescriptionFragment.equals(oldStateDescriptionFragment)) {
|
if (!stateDescriptionFragment.equals(oldStateDescriptionFragment)) {
|
||||||
logger.trace("adding state description for channel {}", channelUID);
|
logger.trace("adding state description for channel {}", channelUID);
|
||||||
stateDescriptionFragments.put(channelUID, stateDescriptionFragment);
|
stateDescriptionFragments.put(channelUID, stateDescriptionFragment);
|
||||||
|
ItemChannelLinkRegistry itemChannelLinkRegistry = this.itemChannelLinkRegistry;
|
||||||
postEvent(ThingEventFactory.createChannelDescriptionChangedEvent(channelUID,
|
postEvent(ThingEventFactory.createChannelDescriptionChangedEvent(channelUID,
|
||||||
itemChannelLinkRegistry != null ? itemChannelLinkRegistry.getLinkedItemNames(channelUID) : Set.of(),
|
itemChannelLinkRegistry != null ? itemChannelLinkRegistry.getLinkedItemNames(channelUID) : Set.of(),
|
||||||
stateDescriptionFragment, oldStateDescriptionFragment));
|
stateDescriptionFragment, oldStateDescriptionFragment));
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class DeconzBridgeHandler extends BaseBridgeHandler implements WebSocketC
|
||||||
String url = buildUrl(config.getHostWithoutPort(), config.httpPort, config.apikey);
|
String url = buildUrl(config.getHostWithoutPort(), config.httpPort, config.apikey);
|
||||||
return http.get(url, config.timeout).thenApply(r -> {
|
return http.get(url, config.timeout).thenApply(r -> {
|
||||||
if (r.getResponseCode() == 403) {
|
if (r.getResponseCode() == 403) {
|
||||||
return Optional.ofNullable((BridgeFullState) null);
|
return Optional.<BridgeFullState> empty();
|
||||||
} else if (r.getResponseCode() == 200) {
|
} else if (r.getResponseCode() == 200) {
|
||||||
return Optional.ofNullable(gson.fromJson(r.getBody(), BridgeFullState.class));
|
return Optional.ofNullable(gson.fromJson(r.getBody(), BridgeFullState.class));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue