From d831ef32844ed5daba349a849e86265970f0cbe4 Mon Sep 17 00:00:00 2001 From: Ace Date: Mon, 26 Oct 2020 09:40:50 +0530 Subject: [PATCH] code improvements --- .../core/operation/mgt/dao/impl/GenericOperationDAOImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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()); }