mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing the null pointer issue in policy manager
This commit is contained in:
parent
c42260feb6
commit
2b7d5fd66b
@ -70,7 +70,10 @@ public class PolicyFilterImpl implements PolicyFilter {
|
|||||||
Map<Integer, Policy> policyMap = new HashMap<>();
|
Map<Integer, Policy> policyMap = new HashMap<>();
|
||||||
for (Policy policy : policies) {
|
for (Policy policy : policies) {
|
||||||
List<DeviceGroupWrapper> wrappers = policy.getDeviceGroups();
|
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);
|
temp.add(policy);
|
||||||
policyMap.put(policy.getId(), policy);
|
policyMap.put(policy.getId(), policy);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user