From fed4f72d4bec72c151f031a366b9e3d56fd30493 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Mon, 16 Nov 2015 17:41:07 +0530 Subject: [PATCH] Fixing the null pointer --- .../carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } }