diff --git a/components/mediation-commons/src/main/java/org/wso2/carbon/mediation/commons/rest/api/swagger/APIGenerator.java b/components/mediation-commons/src/main/java/org/wso2/carbon/mediation/commons/rest/api/swagger/APIGenerator.java index 90e41421f7a..0f081dc103d 100644 --- a/components/mediation-commons/src/main/java/org/wso2/carbon/mediation/commons/rest/api/swagger/APIGenerator.java +++ b/components/mediation-commons/src/main/java/org/wso2/carbon/mediation/commons/rest/api/swagger/APIGenerator.java @@ -101,7 +101,7 @@ public API generateSynapseAPI() throws APIGenException { // url can be relative the place where the swagger is hosted. apiContext = serversString; } - if (apiContext.isEmpty() || apiContext.equals("/")) { + if (apiContext.isEmpty() || "/".equals(apiContext)) { apiContext = SwaggerConstants.DEFAULT_CONTEXT; } //cleanup context : remove ending '/'