]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] avoid IndexOutOfBoundsException exception (#8587)
authorMarcel <marcelrv@users.noreply.github.com>
Sun, 27 Sep 2020 21:14:04 +0000 (23:14 +0200)
committerGitHub <noreply@github.com>
Sun, 27 Sep 2020 21:14:04 +0000 (23:14 +0200)
In case of the parameters & response are not equal avoid the
java.lang.IndexOutOfBoundsException: Index: 4, Size: 4

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java

index 47b36c45002add59aff77517d69b938e648dc09f..4ba8cae7f6d2695febd210d8e463ef4103462a29 100644 (file)
@@ -426,6 +426,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
         if (res.size() != para.size()) {
             logger.debug("Unexpected size different. Request size {},  response size {}. (Req: {}, Resp:{})",
                     para.size(), res.size(), para, res);
+            return;
         }
         for (int i = 0; i < para.size(); i++) {
             // This is a miot parameter