Use Collection.isEmpty (#10525)
Fixes 47 SAT UseCollectionIsEmpty findings. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -611,7 +611,7 @@ public class AccountServlet extends HttpServlet {
|
||||
if ((stateDeviceSerialNumber == null && device.serialNumber == null)
|
||||
|| (stateDeviceSerialNumber != null && stateDeviceSerialNumber.equals(device.serialNumber))) {
|
||||
List<PairedDevice> pairedDeviceList = state.getPairedDeviceList();
|
||||
if (pairedDeviceList.size() > 0) {
|
||||
if (!pairedDeviceList.isEmpty()) {
|
||||
html.append("<table><tr><th align='left'>Name</th><th align='left'>Value</th></tr>");
|
||||
for (PairedDevice pairedDevice : pairedDeviceList) {
|
||||
html.append("<tr><td>");
|
||||
|
||||
@@ -212,7 +212,7 @@ public class SmartHomeDevicesDiscovery extends AbstractDiscoveryService {
|
||||
}
|
||||
Set<SmartHomeDevice> supportedChildren = SmartHomeDeviceHandler.getSupportedSmartHomeDevices(shg,
|
||||
deviceList);
|
||||
if (supportedChildren.size() == 0) {
|
||||
if (supportedChildren.isEmpty()) {
|
||||
// No children with an supported interface
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user