From 5037c628916cd5a52c8587d0ab8696fd32153a94 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 20 Mar 2019 14:51:16 -0400 Subject: moved object declarations from class level moved object declarations from class level to methods Change-Id: Ifaae789120d5838380840dee4d207495e55dbe5c Issue-ID: SO-1688 Signed-off-by: Benjamin, Max (mb388a) --- .../src/main/java/org/onap/so/client/sdnc/SDNCClient.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bpmn') diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java index 99d5fca31f..cae4a19f20 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java @@ -42,7 +42,6 @@ import org.springframework.stereotype.Component; public class SDNCClient { private static final Logger logger = LoggerFactory.getLogger(SDNCClient.class); - private BaseClient> STOClient = new BaseClient<>(); @Autowired private SDNCProperties properties; @@ -61,6 +60,8 @@ public class SDNCClient { public String post(Object request, SDNCTopology topology) throws MapperException, BadResponseException { String jsonRequest = sdnCommonTasks.buildJsonRequest(request); String targetUrl = properties.getHost() + properties.getPath() + ":" + topology.toString() + "/"; + BaseClient> STOClient = new BaseClient<>(); + STOClient.setTargetUrl(targetUrl); HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth()); STOClient.setHttpHeader(httpHeader); @@ -70,7 +71,8 @@ public class SDNCClient { public String post(Object request, String url) throws MapperException, BadResponseException { - String jsonRequest = sdnCommonTasks.buildJsonRequest(request); + String jsonRequest = sdnCommonTasks.buildJsonRequest(request); + BaseClient> STOClient = new BaseClient<>(); STOClient.setTargetUrl(url); HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth()); STOClient.setHttpHeader(httpHeader); @@ -91,7 +93,8 @@ public class SDNCClient { public String get(String queryLink) throws MapperException, BadResponseException { String request = ""; String jsonRequest = sdnCommonTasks.buildJsonRequest(request); - String targetUrl = UriBuilder.fromUri(properties.getHost()).path(queryLink).build().toString(); + String targetUrl = UriBuilder.fromUri(properties.getHost()).path(queryLink).build().toString(); + BaseClient> STOClient = new BaseClient<>(); STOClient.setTargetUrl(targetUrl); HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth()); STOClient.setHttpHeader(httpHeader); -- cgit 1.2.3-korg