From 6d0bd4cc55aaf0badec93ad2f51821fb61b37264 Mon Sep 17 00:00:00 2001 From: msm1992 Date: Fri, 30 Aug 2024 07:24:28 +0530 Subject: [PATCH] Fix issue in healthcheck API --- .../org/wso2/carbon/apimgt/gateway/internal/DataHolder.java | 2 +- .../org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/internal/DataHolder.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/internal/DataHolder.java index cff90588df0c..fda5cd2ebbcf 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/internal/DataHolder.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/internal/DataHolder.java @@ -235,7 +235,7 @@ public void markApisAsUnDeployedInTenant(String tenantDomain) { private void initializeTenantDeploymentStatusMap() { try { - List tenants = GatewayUtils.getTenantsToBeDeployed(); + Set tenants = GatewayUtils.getTenantsToBeDeployed(); tenantDeployStatus = tenants.stream().collect(Collectors.toMap(str -> str, str -> false)); } catch (APIManagementException e) { log.error("Error while initializing tenant deployment status map", e); diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java index a0dc2850d3b0..f366ad93b63f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java @@ -1741,8 +1741,8 @@ public static String getEagerLoadingEnabledTenantsConfig() { * * @return List of eager loading enabled tenants */ - public static List getTenantsToBeDeployed() throws APIManagementException { - List tenantsToBeDeployed = new ArrayList<>(); + public static Set getTenantsToBeDeployed() throws APIManagementException { + Set tenantsToBeDeployed = new HashSet<>(); tenantsToBeDeployed.add(APIConstants.SUPER_TENANT_DOMAIN); //Read eager loading config from carbon server config, and extract include and exclude tenant lists