mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Check null of pending operations before updating status
This commit is contained in:
parent
d4f0bf7a20
commit
a6f0a71681
@ -582,9 +582,11 @@ public class AndroidDeviceUtils {
|
||||
throws DeviceManagementException {
|
||||
try {
|
||||
List<? extends Operation> pendingOperations = getPendingOperations(deviceIdentifier);
|
||||
for (Operation operation : pendingOperations) {
|
||||
operation.setStatus(Operation.Status.ERROR);
|
||||
AndroidAPIUtils.getDeviceManagementService().updateOperation(deviceIdentifier, operation);
|
||||
if (pendingOperations != null && !pendingOperations.isEmpty()) {
|
||||
for (Operation operation : pendingOperations) {
|
||||
operation.setStatus(Operation.Status.ERROR);
|
||||
AndroidAPIUtils.getDeviceManagementService().updateOperation(deviceIdentifier, operation);
|
||||
}
|
||||
}
|
||||
} catch (OperationManagementException e) {
|
||||
String msg = "Error occurred while retrieving pending operations to update operation statuses of " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user