Use Collection.isEmpty (#10525)
Fixes 47 SAT UseCollectionIsEmpty findings. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -243,7 +243,7 @@ public class NeoHubHandler extends BaseBridgeHandler {
|
||||
|
||||
@Nullable
|
||||
List<? extends AbstractRecord> devices = deviceData.getDevices();
|
||||
if (devices == null || devices.size() == 0) {
|
||||
if (devices == null || devices.isEmpty()) {
|
||||
logger.warn(MSG_FMT_DEVICE_POLL_ERR, "no devices found");
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user