diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index c57f0463da..572cdcf884 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -472,11 +472,10 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { public Response getTraccarUserToken() { if (HttpReportingUtil.isTrackerEnabled()) { - String loggedUserName = CarbonContext.getThreadLocalCarbonContext().getUsername(); - JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(loggedUserName)); + String currentUser = CarbonContext.getThreadLocalCarbonContext().getUsername(); + JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(currentUser)); log.info("================="); - log.info(loggedUserName); log.info(obj.toString()); log.info("=================="); if(obj.has("error")){