]> git.basschouten.com Git - openhab-addons.git/commitdiff
[rme] Remove org.apache.common (#14433)
authorlsiepel <leosiepel@gmail.com>
Tue, 17 Oct 2023 12:22:05 +0000 (14:22 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Oct 2023 12:22:05 +0000 (14:22 +0200)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
bundles/org.openhab.binding.rme/src/main/java/org/openhab/binding/rme/internal/handler/RMEThingHandler.java

index b50c155262502d70d4cd1f1407f71c8c3c57281d..20201abdc2fe3187224c1cf42aa17a929576568f 100644 (file)
@@ -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? ;-)