From 1154f02af5b35a5aae7bb43c149602bfa8bc76b4 Mon Sep 17 00:00:00 2001 From: lsiepel Date: Sun, 19 Feb 2023 22:04:49 +0100 Subject: [PATCH] [neato] Remove org.apache.common (#14415) Signed-off-by: lsiepel --- .../openhab/binding/neato/internal/handler/NeatoHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.neato/src/main/java/org/openhab/binding/neato/internal/handler/NeatoHandler.java b/bundles/org.openhab.binding.neato/src/main/java/org/openhab/binding/neato/internal/handler/NeatoHandler.java index cf8a7f3779142..49166b6319790 100644 --- a/bundles/org.openhab.binding.neato/src/main/java/org/openhab/binding/neato/internal/handler/NeatoHandler.java +++ b/bundles/org.openhab.binding.neato/src/main/java/org/openhab/binding/neato/internal/handler/NeatoHandler.java @@ -17,7 +17,6 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; -import org.apache.commons.lang3.ObjectUtils; import org.eclipse.jdt.annotation.NonNull; import org.openhab.binding.neato.internal.CouldNotFindRobotException; import org.openhab.binding.neato.internal.NeatoBindingConstants; @@ -146,7 +145,9 @@ private void publishChannels() { updateProperty(Thing.PROPERTY_MODEL_ID, neatoState.getMeta().getModelName()); updateState(CHANNEL_STATE, new StringType(neatoState.getRobotState().name())); - updateState(CHANNEL_ERROR, new StringType((String) ObjectUtils.defaultIfNull(neatoState.getError(), ""))); + + String error = neatoState.getError() != null ? neatoState.getError() : ""; + updateState(CHANNEL_ERROR, new StringType(error)); updateState(CHANNEL_ACTION, new StringType(neatoState.getRobotAction().name())); Details details = neatoState.getDetails();