From 5f7683ab097694ad0ff98bd2c3fb3c5567c24c68 Mon Sep 17 00:00:00 2001 From: BLasan Date: Thu, 4 Jan 2024 14:26:26 +0530 Subject: [PATCH] Fix: Spot Bug Issues --- .../apimgt/common/analytics/publishers/dto/API.java | 8 ++++---- .../common/analytics/publishers/dto/URITemplate.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/API.java b/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/API.java index 3c14d18ebded..98eccb4be67e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/API.java +++ b/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/API.java @@ -82,18 +82,18 @@ public void setApiCreatorTenantDomain(String apiCreatorTenantDomain) { } public List getUriTemplates() { - return uriTemplates; + return new ArrayList(uriTemplates); } public void setUriTemplates(List uriTemplates) { - this.uriTemplates = uriTemplates; + this.uriTemplates = new ArrayList(uriTemplates); } public void setApiPolicies(List apiPolicies) { - this.apiPolicies = apiPolicies; + this.apiPolicies = new ArrayList(apiPolicies); } public List getApiPolicies() { - return apiPolicies; + return new ArrayList(apiPolicies); } } diff --git a/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/URITemplate.java b/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/URITemplate.java index 6f93ca300eb4..ccad30f90c0e 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/URITemplate.java +++ b/components/apimgt/org.wso2.carbon.apimgt.common.analytics/src/main/java/org/wso2/carbon/apimgt/common/analytics/publishers/dto/URITemplate.java @@ -34,11 +34,11 @@ public class URITemplate { private List operationPolicies = new ArrayList<>(); public void setOperationPolicies(List operationPolicies) { - this.operationPolicies = operationPolicies; + this.operationPolicies = new ArrayList(operationPolicies); } public List getOperationPolicies() { - return operationPolicies; + return new ArrayList(operationPolicies); } public void setHttpVerb(String httpVerb) {