From 8e4c181446d03b1beaf471f5e72793257cef4255 Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 8 Apr 2015 16:25:49 +0530 Subject: [PATCH] Get profile operations from nect operations method --- .../device/mgt/core/operation/mgt/OperationManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index 721669ab3c5..9542fa8774f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -143,7 +143,7 @@ public class OperationManagerImpl implements OperationManager { public Operation getNextPendingOperation(DeviceIdentifier deviceId) throws OperationManagementException { try { Operation operation = operationDAO.getNextOperation(deviceId); - if (operation instanceof ProfileOperation){ + if (operation!=null && operation.getType().equals(Operation.Type.PROFILE)){ operation = profileOperationDAO.getNextOperation(deviceId); } return operation;