aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-11-28 11:01:24 +0530
committerPatrick Brady <patrick.brady@att.com>2018-11-28 21:40:32 +0000
commit6a03a867bcc22c3bc03c53f05f83d46551427584 (patch)
tree2717e8c43d6c80a54d6b0c47b67bab51a79bcf7b /appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle
parent684063c07f4c55f2d44253709c38cc81eebb1d63 (diff)
Sonar Fix: ChefApiClientFactory.java
Fixed sonar issues/code-smells across this file Issue-ID: APPC-1253 Change-Id: Id1060c34f0b99e906dba618d9ea0aebca0fc1beb Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle')
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java
index c41142cc0..9a657c980 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java
@@ -41,6 +41,9 @@ public class ChefApiClientFactory {
private static final EELFLogger logger = EELFManager.getInstance().getLogger(ChefApiClientFactory.class);
+ private HttpClient httpClient = createChefHttpClient();
+ private ChefApiHeaderFactory chefApiHeaderFactory = new ChefApiHeaderFactory();
+
private HttpClient createChefHttpClient() {
String trustStoreFileName = "/opt/app/bvc/chef/chefServerSSL.jks";
char[] trustStoreCreds = "adminadmin".toCharArray();
@@ -56,9 +59,6 @@ public class ChefApiClientFactory {
return null;
}
- private HttpClient httpClient = createChefHttpClient();
- private ChefApiHeaderFactory chefApiHeaderFactory = new ChefApiHeaderFactory();
-
public ChefApiClient create(String endPoint, String organizations, String userId, String pemPath) {
return new ChefApiClientImpl(httpClient, endPoint, organizations, (methodName, requestPath, body) -> chefApiHeaderFactory
.create(methodName, requestPath, body, userId, organizations, pemPath));