From d15eb10636ece6e60dd8bc80cf7507013ca3bb69 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Sat, 17 Oct 2015 17:08:12 +0530 Subject: [PATCH] Adding the null check to monitiring frequncy and fixing the servlet-api issue which is caused a compilation error --- .../policy/mgt/core/util/PolicyManagerUtil.java | 8 +++++--- pom.xml | 12 ++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java index 502740018b..990cb24875 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagerUtil.java @@ -204,9 +204,11 @@ public class PolicyManagerUtil { tenantConfiguration = configMgtService.getConfiguration(GENERAL_CONFIG_RESOURCE_PATH); List configuration = tenantConfiguration.getConfiguration(); - for (ConfigurationEntry cEntry : configuration) { - if (cEntry.getName().equalsIgnoreCase(MONITORING_FREQUENCY)) { - monitoringFrequency = (int) cEntry.getValue(); + if (configuration != null && !configuration.isEmpty()) { + for (ConfigurationEntry cEntry : configuration) { + if (cEntry.getName().equalsIgnoreCase(MONITORING_FREQUENCY)) { + monitoringFrequency = (int) cEntry.getValue(); + } } } diff --git a/pom.xml b/pom.xml index 12b522c5bb..770dffd2c4 100644 --- a/pom.xml +++ b/pom.xml @@ -312,6 +312,10 @@ commons-pool.wso2 commons-pool + + javax.servlet + servlet-api + @@ -386,6 +390,10 @@ org.wso2.carbon.registry org.wso2.carbon.registry.extensions + + javax.servlet + servlet-api + @@ -808,6 +816,10 @@ org.wso2.carbon.registry org.wso2.carbon.registry.ws.client + + javax.servlet + servlet-api +