Merge pull request #487 from geethkokila/release-2.0.x

Fixing the null pointer issue in policy manager
revert-70aa11f8
Geeth 8 years ago committed by GitHub
commit 29bf6f25cf

@ -70,7 +70,10 @@ public class PolicyFilterImpl implements PolicyFilter {
Map<Integer, Policy> policyMap = new HashMap<>();
for (Policy policy : policies) {
List<DeviceGroupWrapper> wrappers = policy.getDeviceGroups();
if (PolicyManagementConstants.ANY.equalsIgnoreCase(wrappers.get(0).getName())) {
if (wrappers.isEmpty()) {
temp.add(policy);
continue;
} else if (PolicyManagementConstants.ANY.equalsIgnoreCase(wrappers.get(0).getName())) {
temp.add(policy);
policyMap.put(policy.getId(), policy);
continue;

Loading…
Cancel
Save