From 7ec32e4a2801db23dd9ba8c1d5316c222d115a5b Mon Sep 17 00:00:00 2001 From: chashikajw Date: Mon, 27 May 2024 22:43:30 +0530 Subject: [PATCH] Remove redundant method call --- .../enforcer/analytics/ChoreoAnalyticsProvider.java | 7 +++++-- .../enforcer/analytics/ChoreoFaultAnalyticsProvider.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoAnalyticsProvider.java b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoAnalyticsProvider.java index 7fda01a0d0..bedb083b32 100644 --- a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoAnalyticsProvider.java +++ b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoAnalyticsProvider.java @@ -224,8 +224,11 @@ public String getEndUserIP() { @Override public Map getProperties() { AnalyticsCustomDataProvider customDataProvider = AnalyticsFilter.getAnalyticsCustomDataProvider(); - if (customDataProvider != null && customDataProvider.getCustomProperties(customProperties) != null) { - return customDataProvider.getCustomProperties(customProperties); + if (customDataProvider != null) { + Map customPropertyMap = customDataProvider.getCustomProperties(customProperties); + if (customPropertyMap != null) { + return customPropertyMap; + } } return this.customProperties; } diff --git a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoFaultAnalyticsProvider.java b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoFaultAnalyticsProvider.java index 27bcfddc6b..a406128f8e 100644 --- a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoFaultAnalyticsProvider.java +++ b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/analytics/ChoreoFaultAnalyticsProvider.java @@ -240,8 +240,11 @@ public String getEndUserIP() { @Override public Map getProperties() { AnalyticsCustomDataProvider customDataProvider = AnalyticsFilter.getAnalyticsCustomDataProvider(); - if (customDataProvider != null && customDataProvider.getCustomProperties(customProperties) != null) { - return customDataProvider.getCustomProperties(customProperties); + if (customDataProvider != null) { + Map customPropertyMap = customDataProvider.getCustomProperties(customProperties); + if (customPropertyMap != null) { + return customPropertyMap; + } } return this.customProperties; }