From 174fee571864ad629ca9720a8eaa0909aa4c8241 Mon Sep 17 00:00:00 2001 From: Thisal Tennakoon Date: Thu, 21 Mar 2024 14:04:41 +0530 Subject: [PATCH] Add instanceof check to isEndpointExist function --- .../java/org/wso2/carbon/endpoint/service/EndpointAdmin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mediation-admin/org.wso2.carbon.endpoint/src/main/java/org/wso2/carbon/endpoint/service/EndpointAdmin.java b/components/mediation-admin/org.wso2.carbon.endpoint/src/main/java/org/wso2/carbon/endpoint/service/EndpointAdmin.java index 43b7ac68105..dbd3f127259 100644 --- a/components/mediation-admin/org.wso2.carbon.endpoint/src/main/java/org/wso2/carbon/endpoint/service/EndpointAdmin.java +++ b/components/mediation-admin/org.wso2.carbon.endpoint/src/main/java/org/wso2/carbon/endpoint/service/EndpointAdmin.java @@ -1075,7 +1075,7 @@ public boolean isEndpointExist(String endpointName) throws EndpointAdminExceptio lock.lock(); assertNameNotEmpty(endpointName); log.debug("Check Endpoint Existence : " + endpointName + " in the configuration"); - return getSynapseConfiguration().getLocalRegistry().containsKey(endpointName.trim()); + return getSynapseConfiguration().getLocalRegistry().get(endpointName.trim()) instanceof Endpoint; } catch (SynapseException syne) { handleFault("Unable to check existence ", syne); } finally {