Fixing the null pointer

This commit is contained in:
geethkokila 2015-11-16 17:41:07 +05:30
parent 0f146e83fa
commit fed4f72d4b

View File

@ -249,7 +249,7 @@ public class MonitoringManagerImpl implements MonitoringManager {
HashMap<Integer, Integer> 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));
}
}