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 4a09e92d73f1..b7103b4bfee2 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});