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 {