Fixing NPE of EMM-1715

merge-requests/7/head
susinda 8 years ago
parent eb20d1fc1c
commit ca68181541

@ -380,8 +380,11 @@ public class MonitoringManagerImpl implements MonitoringManager {
List<String> deviceTypes = new ArrayList<>();
try {
//when shutdown, it sets DeviceManagementService to null, therefore need to have a null check
if (PolicyManagementDataHolder.getInstance().getDeviceManagementService() != null) {
deviceTypes =
PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes();
}
} catch (DeviceManagementException e) {
throw new PolicyComplianceException("Error occurred while getting the device types.", e);
}

Loading…
Cancel
Save