From 5c96c792c0d94cfaf7452750f83a34287b95dd5e Mon Sep 17 00:00:00 2001 From: HariRangarajan-Solace Date: Wed, 25 Sep 2024 10:24:48 +0200 Subject: [PATCH] Fixed issue with Configuration class providing static ApiClient object. --- .../asyncapi/tool/sap/is/converter/commons/ApiClientUtil.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/ep/asyncapi/tool/sap/is/converter/commons/ApiClientUtil.java b/src/main/java/ep/asyncapi/tool/sap/is/converter/commons/ApiClientUtil.java index f9148dd..4530014 100644 --- a/src/main/java/ep/asyncapi/tool/sap/is/converter/commons/ApiClientUtil.java +++ b/src/main/java/ep/asyncapi/tool/sap/is/converter/commons/ApiClientUtil.java @@ -1,7 +1,6 @@ package ep.asyncapi.tool.sap.is.converter.commons; import com.solace.cloud.ep.designer.ApiClient; -import com.solace.cloud.ep.designer.Configuration; import com.solace.cloud.ep.designer.auth.HttpBearerAuth; import jakarta.servlet.http.HttpSession; import lombok.extern.slf4j.Slf4j; @@ -18,7 +17,7 @@ public class ApiClientUtil { public ApiClient initializeApiClient(final String epToken) { if (StringUtils.hasText(epToken)) { - ApiClient apiClient = Configuration.getDefaultApiClient(); + final ApiClient apiClient = new ApiClient(); apiClient.setBasePath(basePath); HttpBearerAuth APIToken = (HttpBearerAuth) apiClient.getAuthentication("APIToken"); APIToken.setBearerToken(epToken);