From e254d4ccc81f80bc072a7e49ce59613552505f64 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 4 Jan 2018 00:29:23 +0530 Subject: [PATCH] Fixing https://github.com/wso2/product-iots/issues/1553 and https://github.com/wso2/product-iots/issues/1546 --- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3399bd3938..6d3af652a3 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 @@ -558,7 +558,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv DeviceManagementDAOFactory.closeConnection(); } - if (requireDeviceInfo) { + if (!allDevices.isEmpty() && requireDeviceInfo) { return this.getAllDeviceInfo(allDevices); } return allDevices;