From bfd1f794de345e9a740a760d137d7f6b6f1bfc76 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Tue, 23 Feb 2021 19:34:21 +0530 Subject: [PATCH] Fix issue in enrollment object modification --- .../mgt/core/status/task/impl/DeviceStatusMonitoringTask.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java index 99e0bd0c3e..7bc831c313 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/status/task/impl/DeviceStatusMonitoringTask.java @@ -99,8 +99,7 @@ public class DeviceStatusMonitoringTask extends DynamicPartitionedScheduleTask { long lastUpdatedTime = (timeMillis - monitoringData .getLastUpdatedTime()) / 1000; - EnrolmentInfo enrolmentInfo = new EnrolmentInfo(); - enrolmentInfo.setId(monitoringData.getDevice().getEnrolmentInfo().getId()); + EnrolmentInfo enrolmentInfo = monitoringData.getDevice().getEnrolmentInfo(); EnrolmentInfo.Status status = null; if (lastUpdatedTime >= this.deviceStatusTaskPluginConfig .getIdleTimeToMarkInactive()) {