From a8c1d0927f9eeaf559442438437bd1b052acc22a Mon Sep 17 00:00:00 2001 From: lsiepel Date: Tue, 17 Oct 2023 14:22:05 +0200 Subject: [PATCH] [rme] Remove org.apache.common (#14433) Signed-off-by: Leo Siepel --- .../binding/rme/internal/handler/RMEThingHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.rme/src/main/java/org/openhab/binding/rme/internal/handler/RMEThingHandler.java b/bundles/org.openhab.binding.rme/src/main/java/org/openhab/binding/rme/internal/handler/RMEThingHandler.java index b50c1552625..20201abdc2f 100644 --- a/bundles/org.openhab.binding.rme/src/main/java/org/openhab/binding/rme/internal/handler/RMEThingHandler.java +++ b/bundles/org.openhab.binding.rme/src/main/java/org/openhab/binding/rme/internal/handler/RMEThingHandler.java @@ -15,7 +15,6 @@ package org.openhab.binding.rme.internal.handler; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.commons.lang3.StringUtils; import org.openhab.binding.rme.internal.RMEBindingConstants.DataField; import org.openhab.core.io.transport.serial.SerialPortManager; import org.openhab.core.library.types.DecimalType; @@ -24,6 +23,7 @@ import org.openhab.core.library.types.StringType; import org.openhab.core.thing.ChannelUID; import org.openhab.core.thing.Thing; import org.openhab.core.types.Command; +import org.openhab.core.util.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -79,7 +79,9 @@ public class RMEThingHandler extends SerialThingHandler { @Override public void onDataReceived(String receivedLine) { String line = StringUtils.chomp(receivedLine); - + if (line == null) { + line = ""; + } // little hack to overcome Locale limits of the RME Rain Manager // note to the attentive reader : should we add support for system // locale's in the Type classes? ;-)