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; }