From d716d0378702815636ee4c8c7c7bdd9bfcfc7c7c Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 27 Sep 2020 23:14:04 +0200 Subject: [PATCH] [miio] avoid IndexOutOfBoundsException exception (#8587) In case of the parameters & response are not equal avoid the java.lang.IndexOutOfBoundsException: Index: 4, Size: 4 Signed-off-by: Marcel Verpaalen --- .../openhab/binding/miio/internal/handler/MiIoBasicHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java index 47b36c45002..4ba8cae7f6d 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java @@ -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