From 8b5e336986304ee137ce412f456816e3ca333cd3 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Wed, 4 Mar 2020 14:10:06 +0530 Subject: [PATCH] Use the method to retrieve the reporting host --- .../details/mgt/impl/DeviceInformationManagerImpl.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/device/details/mgt/impl/DeviceInformationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java index aa11b9f68f..78b2119efb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/device/details/mgt/impl/DeviceInformationManagerImpl.java @@ -176,9 +176,8 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager { } private void publishEvents(Device device, DeviceInfo deviceInfo) { - String reportingHost = System.getProperty(DeviceManagementConstants.Report - .REPORTING_EVENT_HOST); - if (reportingHost != null && !reportingHost.isEmpty() && isPublishingEnabledForTenant()) { + String reportingHost = HttpReportingUtil.getReportingHost(); + if (!StringUtils.isBlank(reportingHost) && isPublishingEnabledForTenant()) { try { DeviceDetailsWrapper deviceDetailsWrapper = new DeviceDetailsWrapper(); deviceDetailsWrapper.setDevice(device);