diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java index caa4de580a5..7094afdcd36 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java @@ -376,9 +376,8 @@ public class GenericOperationDAOImpl implements OperationDAO { for (Map.Entry> deviceOpRes : deviceOpResponseMap.entrySet()) { for (ActivityStatus status : activityStatuses) { if (deviceOpRes.getKey().equalsIgnoreCase(status.getDeviceIdentifier().getId())) { - if(status.getResponses()==null){ - List responses = new ArrayList<>(); - status.setResponses(responses); + if (status.getResponses() == null) { + status.setResponses(new ArrayList<>()); } status.getResponses().addAll(deviceOpRes.getValue()); }