Fix sonar issue SslSupportLevel 39/106239/1
authoredyta <edyta.krukowska@nokia.com>
Mon, 20 Apr 2020 05:38:45 +0000 (07:38 +0200)
committeredyta <edyta.krukowska@nokia.com>
Mon, 20 Apr 2020 05:41:11 +0000 (07:41 +0200)
Issue-ID: INT-1517
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Change-Id: Ib871854a2becfbef7cf568f09f20b61b72361547

pnfsimulator/src/main/java/org/onap/pnfsimulator/simulator/client/utils/ssl/SslSupportLevel.java

index 264a7d1..c05f4c6 100644 (file)
@@ -40,10 +40,7 @@ import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.security.GeneralSecurityException;
-import java.security.KeyManagementException;
 import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
 import java.util.Optional;
 
 public enum SslSupportLevel {
@@ -71,7 +68,7 @@ public enum SslSupportLevel {
                         .build();
 
             } catch (GeneralSecurityException e) {
-                LOGGER.error("Could not initialize client due to SSL exception: {}. Default client without SSL support will be used instead.\nCause: {}", e.getMessage(), e.getCause());
+                LOGGER.error("Could not initialize client due to SSL exception: {}. Default client without SSL support will be used instead.\nCause: {}", e.getMessage(), e.getCause().toString());
                 client = NONE.getClient(requestConfig, sslAuthenticationHelper);
             }
             return client;