From 1655b512b009b55a9f51a75a752ed06dc3617275 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Thu, 22 Jun 2017 15:55:22 +0530 Subject: [PATCH] Fixing formating issues --- .../device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java | 3 ++- .../org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java index 4a8ace7bbd..7b65a3b6ee 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/task/impl/DeviceDetailsRetrieverTask.java @@ -41,6 +41,7 @@ public class DeviceDetailsRetrieverTask implements Task { private String oppConfig; private OperationMonitoringTaskConfig operationMonitoringTaskConfig; private boolean executeForTenants = false; + private final String IS_CLOUD = "is.cloud"; @Override public void setProperties(Map map) { @@ -60,7 +61,7 @@ public class DeviceDetailsRetrieverTask implements Task { @Override public void execute() { - if(System.getProperty("is.cloud") != null && Boolean.parseBoolean(System.getProperty("is.cloud"))){ + if(System.getProperty(IS_CLOUD) != null && Boolean.parseBoolean(System.getProperty(IS_CLOUD))){ executeForTenants = true; } if(executeForTenants){ diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java index 3be4e2a562..f489a1386a 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/task/MonitoringTask.java @@ -44,6 +44,7 @@ public class MonitoringTask implements Task { Map properties; private boolean executeForTenants = false; + private final String IS_CLOUD = "is.cloud"; @Override @@ -61,7 +62,7 @@ public class MonitoringTask implements Task { if (log.isDebugEnabled()) { log.debug("Monitoring task started to run."); } - if(System.getProperty("is.cloud") != null && Boolean.parseBoolean(System.getProperty("is.cloud"))){ + if(System.getProperty(IS_CLOUD) != null && Boolean.parseBoolean(System.getProperty(IS_CLOUD))){ executeForTenants = true; } if(executeForTenants) {