mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fixed null pointer in the initial operations
This commit is contained in:
parent
483d09ebf1
commit
cb9db4dd1d
@ -2114,7 +2114,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
deviceIdentifiers.add(deviceIdentifier);
|
deviceIdentifiers.add(deviceIdentifier);
|
||||||
if (init != null) {
|
if (init != null) {
|
||||||
List<String> initialOperations = init.getOperations();
|
List<String> initialOperations = init.getOperations();
|
||||||
|
if (initialOperations != null) {
|
||||||
for (String str : initialOperations) {
|
for (String str : initialOperations) {
|
||||||
CommandOperation operation = new CommandOperation();
|
CommandOperation operation = new CommandOperation();
|
||||||
operation.setEnabled(true);
|
operation.setEnabled(true);
|
||||||
@ -2125,15 +2125,18 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
addOperation(deviceType,
|
addOperation(deviceType,
|
||||||
operation, deviceIdentifiers);
|
operation, deviceIdentifiers);
|
||||||
} catch (OperationManagementException e) {
|
} catch (OperationManagementException e) {
|
||||||
throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(),
|
throw new DeviceManagementException(
|
||||||
|
"Unable to find the device with the id: '" + deviceIdentifier.getId(),
|
||||||
e);
|
e);
|
||||||
} catch (InvalidDeviceException e) {
|
} catch (InvalidDeviceException e) {
|
||||||
throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(),
|
throw new DeviceManagementException(
|
||||||
|
"Unable to find the device with the id: '" + deviceIdentifier.getId(),
|
||||||
e);
|
e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks for the default group existence and create group based on device ownership
|
* Checks for the default group existence and create group based on device ownership
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user