From 956acec6208903d269b1bd920fe13ba7899cc3a8 Mon Sep 17 00:00:00 2001 From: rusirijayodaillesinghe Date: Wed, 9 Oct 2024 11:16:56 +0530 Subject: [PATCH] Fix file name of common policies which are loaded from repository/resources --- .../main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java index c1dc60e7219d..439cbc3dd1d3 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java @@ -10079,8 +10079,9 @@ public static void loadCommonOperationPolicies(String organization) { OperationPolicyData policyData = new OperationPolicyData(); policyData.setSpecification(policySpec); policyData.setOrganization(organization); + //since the directory contains common policies only, files are not renamed with type String policyFileName = getOperationPolicyFileName(policySpec.getName(), - policySpec.getVersion(), ImportExportConstants.POLICY_TYPE_COMMON); + policySpec.getVersion(), null); OperationPolicyDefinition synapsePolicyDefinition = getOperationPolicyDefinitionFromFile(policyDefinitionLocation, policyFileName, APIConstants.SYNAPSE_POLICY_DEFINITION_EXTENSION);