Skip to content

Commit

Permalink
[miio] avoid NPE in discovery in case of unexpected response cloud (o…
Browse files Browse the repository at this point in the history
…penhab#11420)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
  • Loading branch information
marcelrv authored and NickWaterton committed Dec 30, 2021
1 parent d9548d4 commit 0c311e8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
package org.openhab.binding.miio.internal.cloud;

import java.util.Collections;
import java.util.List;

import com.google.gson.annotations.Expose;
Expand All @@ -29,6 +30,9 @@ public class CloudDeviceListDTO {
private List<CloudDeviceDTO> cloudDevices = null;

public List<CloudDeviceDTO> getCloudDevices() {
if (cloudDevices == null) {
return Collections.emptyList();
}
return cloudDevices;
}
}

0 comments on commit 0c311e8

Please sign in to comment.