From fc7f80c543c9c627df5c5cc29b498452e2fa6f58 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 22 Feb 2018 13:03:16 +0530 Subject: [PATCH] Removing un-necessary checks when retrieving getAllDeviceInfo --- .../core/service/DeviceManagementProviderServiceImpl.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index cd82f01d2b..13ab28dd79 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -2535,14 +2535,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv * of the given device list. */ private List getAllDeviceInfo(List allDevices) throws DeviceManagementException { - if (allDevices.size() == 0) { - String msg = "Received empty device list for getAllDeviceInfo"; - log.error(msg); - throw new DeviceManagementException(msg); - } - if (log.isDebugEnabled()) { - log.debug("Get all device info of devices, num of devices: " + allDevices.size()); - } List devices = new ArrayList<>(); for (Device device : allDevices) { device.setDeviceInfo(this.getDeviceInfo(device));