Skip to content

Commit

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

Signed-off-by: Marcel Verpaalen <[email protected]>
  • Loading branch information
marcelrv authored Oct 22, 2021
1 parent b893b07 commit 3eb5e56
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 3eb5e56

Please sign in to comment.