diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2018-12-21 19:56:35 +0530 |
---|---|---|
committer | IBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com> | 2018-12-21 19:56:45 +0530 |
commit | 706174d75988a3e97ea107aa384b7c7e1c291855 (patch) | |
tree | 2bb2d4ef8c89484de051354a747a23d1e6377873 | |
parent | 5df4fb30eaf3bbbd6ac5802a8f75fcf8c19d4e6f (diff) |
Sonar fix: ConnectionBuilder.java
Fixed sonar issues/code-smells across this file
Issue-ID: CCSDK-873
Change-Id: Ibcfc910194019de6d92a216cde691e50a417ece9
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r-- | ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java index 645a7baf..6295a255 100644 --- a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java +++ b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs + * ================================================================================ + * Modifications Copyright © 2018 IBM. * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +36,6 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLException; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.auth.AuthScope; @@ -52,7 +53,6 @@ import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; import org.onap.ccsdk.sli.adaptors.ansible.model.AnsibleResult; import org.onap.ccsdk.sli.adaptors.ansible.model.AnsibleResultCodes; -import org.onap.ccsdk.sli.core.sli.SvcLogicException; import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; @@ -76,7 +76,7 @@ public class ConnectionBuilder { * Constructor that initializes an http client based on certificate **/ public ConnectionBuilder(String certFile) throws KeyStoreException, CertificateException, IOException, - KeyManagementException, NoSuchAlgorithmException, SvcLogicException { + KeyManagementException, NoSuchAlgorithmException { /* Point to the certificate */ try(FileInputStream fs = new FileInputStream(certFile)){ @@ -121,7 +121,7 @@ public class ConnectionBuilder { * Default if Mode == 0 */ public ConnectionBuilder(int mode) - throws SSLException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException { + throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException { if (mode == 1) { SSLContext sslcontext = SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(); SSLConnectionSocketFactory factory = new SSLConnectionSocketFactory(sslcontext, |