mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing NPE of EMM-1715
This commit is contained in:
parent
eb20d1fc1c
commit
ca68181541
@ -380,8 +380,11 @@ public class MonitoringManagerImpl implements MonitoringManager {
|
|||||||
|
|
||||||
List<String> deviceTypes = new ArrayList<>();
|
List<String> deviceTypes = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
|
//when shutdown, it sets DeviceManagementService to null, therefore need to have a null check
|
||||||
|
if (PolicyManagementDataHolder.getInstance().getDeviceManagementService() != null) {
|
||||||
deviceTypes =
|
deviceTypes =
|
||||||
PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes();
|
PolicyManagementDataHolder.getInstance().getDeviceManagementService().getAvailableDeviceTypes();
|
||||||
|
}
|
||||||
} catch (DeviceManagementException e) {
|
} catch (DeviceManagementException e) {
|
||||||
throw new PolicyComplianceException("Error occurred while getting the device types.", e);
|
throw new PolicyComplianceException("Error occurred while getting the device types.", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user