From 389d4e225143445c50f913257ae9c2e21914a640 Mon Sep 17 00:00:00 2001 From: binod Date: Wed, 19 Jul 2023 15:56:38 +0530 Subject: [PATCH] Fix error when websub_event_receiver not defined for vhost --- .../org/wso2/carbon/apimgt/impl/APIManagerConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerConfiguration.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerConfiguration.java index 766988fdd961..249af7eb21ff 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerConfiguration.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIManagerConfiguration.java @@ -725,8 +725,8 @@ void setEnvironmentConfig(OMElement environmentElem) throws APIManagementExcepti //Prefix websub endpoints with 'websub_' so that the endpoint URL // would begin with: 'websub_http://', since API type is identified by the URL protocol below. - webSubHttpEp = "websub_" + webSubHttpEp; - webSubHttpsEp = "websub_" + webSubHttpsEp; + webSubHttpEp = StringUtils.isNotBlank(webSubHttpEp) ? "websub_" + webSubHttpEp : webSubHttpEp; + webSubHttpsEp = StringUtils.isNotBlank(webSubHttpsEp) ? "websub_" + webSubHttpsEp : webSubHttpsEp; VHost vhost = VHost.fromEndpointUrls(new String[]{ httpEp, httpsEp, wsEp, wssEp, webSubHttpEp, webSubHttpsEp});