[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 <marcel@verpaalen.com>
This commit is contained in:
Marcel 2020-09-27 23:14:04 +02:00 committed by GitHub
parent fe7b176cb7
commit d716d03787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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