Skip to content

Commit

Permalink
Fix: TemplateUtil Test error
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Sep 23, 2024
1 parent 00d6c1c commit 0e4a9ac
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public class TemplateBuilderUtil {
private static final String ENDPOINT_SANDBOX = "_SANDBOX_";

private static final Log log = LogFactory.getLog(TemplateBuilderUtil.class);
private static final ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();

public static APITemplateBuilderImpl getAPITemplateBuilder(API api, String tenantDomain,
List<ClientCertificateDTO> clientCertificateDTOSProduction,
Expand Down Expand Up @@ -524,6 +523,7 @@ public static GatewayAPIDTO retrieveGatewayAPIDto(API api, Environment environme
if (endpointConf != null && APIConstants.ENDPOINT_TYPE_SEQUENCE.equals(
endpointConf.get(API_ENDPOINT_CONFIG_PROTOCOL_TYPE).getAsString()) && StringUtils.equals(
api.getType().toLowerCase(), APIConstants.API_TYPE_HTTP.toLowerCase())) {
ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();
// To modify the endpoint config string
JSONParser parser = new JSONParser();
ObjectMapper objectMapper = new ObjectMapper();
Expand Down Expand Up @@ -1475,6 +1475,7 @@ private static GatewayContentDTO retrieveSequenceBackendForAPIProduct(API api, A
String endpointType, String pathToAchieve) throws APIManagementException {
GatewayContentDTO customBackendSequenceContentDto = new GatewayContentDTO();
String customSequence = null;
ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();
SequenceBackendData data = apiMgtDAO.getCustomBackendByAPIUUID(api.getUuid(), endpointType);
if (data != null) {
String seqExt = data.getName();
Expand Down Expand Up @@ -1512,6 +1513,7 @@ private static GatewayContentDTO retrieveSequenceBackendForAPIProduct(API api, A

private static GatewayContentDTO retrieveCustomBackendSequence(API api, String endpointType, String pathToAchieve)
throws APIManagementException {
ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();
GatewayContentDTO customBackendSequenceContentDto = new GatewayContentDTO();
String customSequence = null;
SequenceBackendData data = apiMgtDAO.getCustomBackendByAPIUUID(api.getUuid(), endpointType);
Expand Down

0 comments on commit 0e4a9ac

Please sign in to comment.