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>
  • Loading branch information
marcelrv committed Oct 22, 2021
1 parent 5afd491 commit 49d4f1b
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 49d4f1b

Please sign in to comment.