From 83be4b661f75d77ceeb334f7ed2fecc28b8cdaeb Mon Sep 17 00:00:00 2001 From: Suneth Samarasinghe Date: Fri, 14 Jul 2023 10:50:51 +0530 Subject: [PATCH] Minor change in logic --- .../carbon/mediation/commons/rest/api/swagger/APIGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 '/'