*/
public void publishChannelIfLinked(ChannelUID channelUID) {
Planet planet = getPlanet();
- if (isLinked(channelUID.getId()) && planet != null) {
- final Channel channel = getThing().getChannel(channelUID.getId());
+ if (isLinked(channelUID) && planet != null) {
+ final Channel channel = getThing().getChannel(channelUID);
if (channel == null) {
logger.error("Cannot find channel for {}", channelUID);
return;
private boolean isPositionalChannelLinked() {
List<String> positionalChannels = Arrays.asList(getPositionalChannelIds());
for (Channel channel : getThing().getChannels()) {
- String id = channel.getUID().getId();
- if (isLinked(id) && positionalChannels.contains(id)) {
+ ChannelUID id = channel.getUID();
+ if (isLinked(id) && positionalChannels.contains(id.getId())) {
return true;
}
}
Thing thing = mock(Thing.class);
when(thing.getConfiguration()).thenReturn(thingConfiguration);
when(thing.getUID()).thenReturn(thingUID);
- when(thing.getChannel(DEFAULT_TEST_CHANNEL_ID)).thenReturn(channel);
+ when(thing.getChannel(channelUID)).thenReturn(channel);
ThingHandlerCallback callback = mock(ThingHandlerCallback.class);
CronScheduler cronScheduler = mock(CronScheduler.class);