diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index 344de73897..598fd80b7e 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -249,7 +249,7 @@ public class MonitoringManagerImpl implements MonitoringManager { HashMap temp = policyDAO.getAppliedPolicyIds(); for (Integer id : deviceIDs) { - if (temp != null && temp.containsKey(id)) { + if (temp != null && !temp.isEmpty() && temp.containsKey(id)) { devicePolicyIdMap.put(id, temp.get(id)); } }