Skip to content

Commit

Permalink
Removed dependency on 'org.apache.commons.collections' (#6656)
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Weitkamp <[email protected]>
  • Loading branch information
cweitkamp authored and wborn committed Dec 22, 2019
1 parent ade9115 commit bc212ae
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.util.function.Consumer;
import java.util.stream.Collectors;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.smarthome.core.thing.Channel;
Expand Down Expand Up @@ -126,7 +124,7 @@ public void initialize() {
started = false;

config = getConfigAs(HandlerConfiguration.class);
if (CollectionUtils.isEmpty(config.topics)) {
if (config.topics == null || config.topics.isEmpty()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Device topics unknown");
return;
}
Expand Down Expand Up @@ -333,7 +331,7 @@ private void updateThingType() {
@Override
public void updateChannelState(ChannelUID channelUID, State value) {

if (StringUtils.equals(channelUID.getIdWithoutGroup(), AVAILABILITY_CHANNEL)) {
if (AVAILABILITY_CHANNEL.equals(channelUID.getIdWithoutGroup())) {
updateThingStatus();
return;
}
Expand Down

0 comments on commit bc212ae

Please sign in to comment.