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 02165504d32e..aeb5b9cc7362 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 @@ -286,7 +286,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 cbfac9bfc75d..a23b18c60e0c 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 @@ -1638,8 +1638,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